From 956f9888b259eea2a4eb84fa1693f12fa39ea884 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sun, 24 Nov 2024 13:08:39 -0500 Subject: [PATCH 1/8] use @JsonProperty annotation to specify actual key the GitLab API is using --- .../java/org/gitlab4j/api/webhook/MergeRequestEvent.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java b/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java index 667c06f80..fae959248 100644 --- a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java @@ -6,6 +6,8 @@ import org.gitlab4j.api.models.Reviewer; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class MergeRequestEvent extends AbstractEvent { private static final long serialVersionUID = 1L; @@ -15,7 +17,10 @@ public class MergeRequestEvent extends AbstractEvent { private EventUser user; private EventProject project; private EventRepository repository; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private List labels; private MergeRequestChanges changes; private List assignees; From 79e90ba611a9de382b36be95198f6011d25383a5 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sun, 24 Nov 2024 13:34:53 -0500 Subject: [PATCH 2/8] other object_attribute fields --- .../org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java | 5 +++++ src/main/java/org/gitlab4j/api/webhook/IssueEvent.java | 5 +++++ src/main/java/org/gitlab4j/api/webhook/NoteEvent.java | 4 ++++ src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java | 4 ++++ src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java | 4 ++++ src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java | 5 +++++ 6 files changed, 27 insertions(+) diff --git a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java b/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java index 5c7178930..b5f5a5c24 100644 --- a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java @@ -7,6 +7,8 @@ import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.webhook.MergeRequestEvent.ObjectAttributes; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ExternalStatusCheckEvent implements Serializable { private static final long serialVersionUID = 1L; @@ -15,7 +17,10 @@ public class ExternalStatusCheckEvent implements Serializable { private EventUser user; private EventProject project; private EventRepository repository; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private List labels; private MergeRequestChanges changes; private List assignees; diff --git a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java b/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java index 6d2d37db3..eb6de611c 100644 --- a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java @@ -5,6 +5,8 @@ import org.gitlab4j.api.models.Assignee; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class IssueEvent extends AbstractEvent { private static final long serialVersionUID = 1L; @@ -14,7 +16,10 @@ public class IssueEvent extends AbstractEvent { private EventUser user; private EventProject project; private EventRepository repository; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private List assignees; private Assignee assignee; private List labels; diff --git a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java index 62363d79f..16579b8d6 100644 --- a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java @@ -7,6 +7,7 @@ import org.gitlab4j.api.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class NoteEvent extends AbstractEvent { @@ -19,7 +20,10 @@ public class NoteEvent extends AbstractEvent { private Long projectId; private EventProject project; private EventRepository repository; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private EventCommit commit; private EventIssue issue; private EventMergeRequest mergeRequest; diff --git a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java index 7dac2129d..8b001941d 100644 --- a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java @@ -7,13 +7,17 @@ import org.gitlab4j.api.models.Variable; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class PipelineEvent extends AbstractEvent { private static final long serialVersionUID = 1L; public static final String X_GITLAB_EVENT = "Pipeline Hook"; public static final String OBJECT_KIND = "pipeline"; + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private EventUser user; private EventProject project; private EventCommit commit; diff --git a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java b/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java index 28b240042..e0647129d 100644 --- a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java @@ -2,6 +2,8 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class WikiPageEvent extends AbstractEvent { private static final long serialVersionUID = 1L; @@ -11,6 +13,8 @@ public class WikiPageEvent extends AbstractEvent { private EventUser user; private EventProject project; private Wiki wiki; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; public String getObjectKind() { diff --git a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java b/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java index 8d883d32d..1f30023e7 100644 --- a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java @@ -5,6 +5,8 @@ import org.gitlab4j.api.models.User; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class WorkItemEvent extends AbstractEvent { private static final long serialVersionUID = 1L; @@ -14,7 +16,10 @@ public class WorkItemEvent extends AbstractEvent { private User user; private EventProject project; private EventRepository repository; + + @JsonProperty(value = "object_attributes") private ObjectAttributes objectAttributes; + private List labels; private WorkItemChanges changes; From 610650c184ed54492385b661b6d87c17e2c97ae2 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Mon, 25 Nov 2024 13:36:55 -0500 Subject: [PATCH 3/8] also noticed this file had a similar issue for mergeRequest -> merge_request --- src/main/java/org/gitlab4j/api/webhook/NoteEvent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java index 16579b8d6..9e9f5ed53 100644 --- a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java @@ -26,7 +26,10 @@ public class NoteEvent extends AbstractEvent { private EventCommit commit; private EventIssue issue; + + @JsonProperty(value = "merge_request") private EventMergeRequest mergeRequest; + private EventSnippet snippet; @Override From 0ee803254d699139be1266afcda558e7ae33136a Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sat, 7 Dec 2024 00:33:49 -0500 Subject: [PATCH 4/8] webhooks using @JsonProperty and Format annotations --- .../gitlab4j/api/webhook/AbstractEvent.java | 8 ++ .../api/webhook/AbstractPushEvent.java | 32 +++++ .../org/gitlab4j/api/webhook/BuildCommit.java | 24 ++++ .../org/gitlab4j/api/webhook/BuildEvent.java | 42 +++++++ .../gitlab4j/api/webhook/DeploymentEvent.java | 25 ++++ .../gitlab4j/api/webhook/EventChanges.java | 24 ++++ .../org/gitlab4j/api/webhook/EventCommit.java | 19 +++ .../api/webhook/EventExternalStatusCheck.java | 7 ++ .../org/gitlab4j/api/webhook/EventIssue.java | 30 +++++ .../org/gitlab4j/api/webhook/EventLabel.java | 23 ++++ .../api/webhook/EventMergeRequest.java | 116 ++++++++++++++++++ .../gitlab4j/api/webhook/EventProject.java | 33 +++++ .../api/webhook/EventReleaseAssets.java | 7 ++ .../api/webhook/EventReleaseLink.java | 12 ++ .../api/webhook/EventReleaseSource.java | 5 + .../gitlab4j/api/webhook/EventRepository.java | 15 +++ .../gitlab4j/api/webhook/EventSnippet.java | 27 ++++ .../org/gitlab4j/api/webhook/EventUser.java | 11 ++ .../gitlab4j/api/webhook/EventWorkItem.java | 67 ++++++++++ .../api/webhook/ExternalStatusCheckEvent.java | 18 ++- .../gitlab4j/api/webhook/IssueChanges.java | 15 ++- .../org/gitlab4j/api/webhook/IssueEvent.java | 14 ++- .../org/gitlab4j/api/webhook/JobEvent.java | 40 ++++++ .../api/webhook/MergeRequestChanges.java | 5 + .../api/webhook/MergeRequestEvent.java | 14 ++- .../org/gitlab4j/api/webhook/NoteEvent.java | 46 ++++++- .../gitlab4j/api/webhook/PipelineEvent.java | 9 +- .../gitlab4j/api/webhook/ReleaseEvent.java | 23 ++++ .../gitlab4j/api/webhook/WikiPageEvent.java | 5 + .../gitlab4j/api/webhook/WorkItemChanges.java | 15 ++- .../gitlab4j/api/webhook/WorkItemEvent.java | 10 +- 31 files changed, 725 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java b/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java index 2c8f66194..a0e32bc5e 100644 --- a/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java @@ -1,13 +1,21 @@ package org.gitlab4j.api.webhook; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public abstract class AbstractEvent implements Event { private static final long serialVersionUID = 1L; + @JsonProperty("event_type") private String eventType; + + @JsonProperty("request_url") private String requestUrl; + + @JsonProperty("request_query_string") private String requestQueryString; + + @JsonProperty("secret_token") private String secretToken; public String getEventType() { diff --git a/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java b/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java index 6e89431f0..77927f26f 100644 --- a/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java @@ -3,30 +3,62 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public abstract class AbstractPushEvent { + @JsonProperty("event_name") private String eventName; + @JsonProperty("after") private String after; + + @JsonProperty("before") private String before; + + @JsonProperty("ref") private String ref; + + @JsonProperty("checkout_sha") private String checkoutSha; + @JsonProperty("user_id") private Long userId; + + @JsonProperty("user_name") private String userName; + + @JsonProperty("user_username") private String userUsername; + + @JsonProperty("user_email") private String userEmail; + + @JsonProperty("user_avatar") private String userAvatar; + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; + + @JsonProperty("commits") private List commits; + + @JsonProperty("total_commits_count") private Integer totalCommitsCount; + @JsonProperty("request_url") private String requestUrl; + + @JsonProperty("request_query_string") private String requestQueryString; + + @JsonProperty("request_secret_token") private String requestSecretToken; public String getEventName() { diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java b/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java index a6dfbcae8..1f450b8f8 100644 --- a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java +++ b/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java @@ -4,17 +4,41 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class BuildCommit { + @JsonProperty("id") private Long id; + + @JsonProperty("sha") private String sha; + + @JsonProperty("message") private String message; + + @JsonProperty("author_name") private String authorName; + + @JsonProperty("author_email") private String authorEmail; + + @JsonProperty("author_url") private String authorUrl; + + @JsonProperty("status") private String status; + + @JsonProperty("duration") private Float duration; + + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date startedAt; + + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date finishedAt; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java b/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java index 0e954a107..9827bd754 100644 --- a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java @@ -4,6 +4,9 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * The documentation at: * Job Events is incorrect, this class represents the actual content of the Job Hook event. @@ -14,27 +17,66 @@ public class BuildEvent extends AbstractEvent { public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook"; public static final String OBJECT_KIND = "build"; + @JsonProperty("ref") private String ref; + + @JsonProperty("tag") private Boolean tag; + + @JsonProperty("before_sha") private String beforeSha; + + @JsonProperty("sha") private String sha; + + @JsonProperty("build_id") private Long buildId; + + @JsonProperty("build_name") private String buildName; + + @JsonProperty("build_stage") private String buildStage; + + @JsonProperty("build_status") private String buildStatus; + + @JsonProperty("build_started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date buildStartedAt; + + @JsonProperty("build_finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date buildFinishedAt; + + @JsonProperty("build_duration") private Float buildDuration; + @JsonProperty("build_queued_duration") private Float buildQueuedDuration; + + @JsonProperty("build_allow_failure") private Boolean buildAllowFailure; + + @JsonProperty("build_failure_reason") private String buildFailureReason; + + @JsonProperty("project_id") private Long projectId; + @JsonProperty("pipeline_id") private Long pipelineId; + + @JsonProperty("project_name") private String projectName; + + @JsonProperty("user") private EventUser user; + + @JsonProperty("commit") private BuildCommit commit; + + @JsonProperty("repository") private EventRepository repository; @Override diff --git a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java b/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java index 76b0e2cba..cd796f0ae 100644 --- a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java @@ -2,22 +2,47 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class DeploymentEvent extends AbstractEvent { private static final long serialVersionUID = 1L; public static final String X_GITLAB_EVENT = "Deployment Hook"; public static final String OBJECT_KIND = "deployment"; + @JsonProperty("status") private String status; + + @JsonProperty("status_changed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss Z") private String statusChangedAt; + + @JsonProperty("deployable_id") private Long deployableId; + + @JsonProperty("deployable_url") private String deployableUrl; + + @JsonProperty("environment") private String environment; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("short_sha") private String shortSha; + + @JsonProperty("user") private EventUser user; + + @JsonProperty("user_url") private String userUrl; + + @JsonProperty("commit_url") private String commitUrl; + + @JsonProperty("commit_title") private String commitTitle; @Override diff --git a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java b/src/main/java/org/gitlab4j/api/webhook/EventChanges.java index bc40f7e9e..f4c07461b 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventChanges.java @@ -10,20 +10,44 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; public abstract class EventChanges { + @JsonProperty("author_id") private ChangeContainer authorId; + + @JsonProperty("created_at") private ChangeContainer createdAt; + + @JsonProperty("updated_at") private ChangeContainer updatedAt; + + @JsonProperty("updated_by_id") private ChangeContainer updatedById; + + @JsonProperty("title") private ChangeContainer title; + + @JsonProperty("description") private ChangeContainer description; + + @JsonProperty("state") private ChangeContainer state; + + @JsonProperty("milestone_id") private ChangeContainer milestoneId; + + @JsonProperty("labels") private ChangeContainer> labels; + + @JsonProperty("assignees") private ChangeContainer> assignees; + + @JsonProperty("total_time_spent") private ChangeContainer totalTimeSpent; + + @JsonProperty("other_properties") private Map> otherProperties = new LinkedHashMap<>(); public ChangeContainer getAuthorId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventCommit.java b/src/main/java/org/gitlab4j/api/webhook/EventCommit.java index 55cfd689b..e830ac62e 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventCommit.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventCommit.java @@ -6,15 +6,34 @@ import org.gitlab4j.api.models.Author; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventCommit { + @JsonProperty("id") private String id; + + @JsonProperty("message") private String message; + + @JsonProperty("timestamp") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date timestamp; + + @JsonProperty("url") private String url; + + @JsonProperty("author") private Author author; + + @JsonProperty("added") private List added; + + @JsonProperty("modified") private List modified; + + @JsonProperty("removed") private List removed; public String getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java b/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java index 16feb98b1..9482d4b24 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java @@ -2,10 +2,17 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventExternalStatusCheck { + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("external_url") private String externalUrl; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java b/src/main/java/org/gitlab4j/api/webhook/EventIssue.java index 27c4abf97..67c8b0596 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventIssue.java @@ -4,26 +4,56 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventIssue { + @JsonProperty("assignee_id") private Long assigneeId; + + @JsonProperty("author_id") private Long authorId; + + @JsonProperty("branch_name") private String branchName; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("description") private String description; + + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + @JsonProperty("milestone_id") private String milestoneId; + + @JsonProperty("position") private Integer position; + + @JsonProperty("project_id") private Long projectId; + @JsonProperty("state") private String state; + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + @JsonProperty("url") private String url; + + @JsonProperty("action") private String action; public Long getAssigneeId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java b/src/main/java/org/gitlab4j/api/webhook/EventLabel.java index c77b7db76..8f7a39920 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventLabel.java @@ -7,6 +7,8 @@ import org.gitlab4j.api.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class EventLabel implements Serializable { @@ -35,15 +37,36 @@ public String toString() { } } + @JsonProperty("id") private Long id; + + @JsonProperty("title") private String title; + + @JsonProperty("color") private String color; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("template") private Boolean template; + + @JsonProperty("description") private String description; + + @JsonProperty("type") private LabelType type; + + @JsonProperty("group_id") private Long groupId; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java b/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java index dbdd25c1e..9c536dace 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java @@ -8,66 +8,182 @@ import org.gitlab4j.api.models.Duration; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventMergeRequest { + @JsonProperty("assignee_id") private Long assigneeId; + + @JsonProperty("author_id") private Long authorId; + + @JsonProperty("branch_name") private String branchName; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date createdAt; + + @JsonProperty("description") private String description; + + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("merge_commit_sha") private String mergeCommitSha; + + @JsonProperty("merge_status") private String mergeStatus; + + @JsonProperty("detailed_merge_status") private String detailedMergeStatus; + + @JsonProperty("milestone_id") private Long milestoneId; + + @JsonProperty("position") private Integer position; + + @JsonProperty("locked_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date lockedAt; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("source_branch") private String sourceBranch; + + @JsonProperty("source_project_id") private Long sourceProjectId; + + @JsonProperty("st_commits") private String stCommits; + + @JsonProperty("st_diffs") private String stDiffs; + + @JsonProperty("state") private String state; + + @JsonProperty("state_id") private Long stateId; + + @JsonProperty("target_branch") private String targetBranch; + + @JsonProperty("target_project_id") private Long targetProjectId; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date updatedAt; + @JsonProperty("source") private EventProject source; + + @JsonProperty("target") private EventProject target; + + @JsonProperty("last_commit") private EventCommit lastCommit; + + @JsonProperty("blocking_discussions_resolved") private Boolean blockingDiscussionsResolved; + + @JsonProperty("work_in_progress") private Boolean workInProgress; + + @JsonProperty("first_contribution") private Boolean firstContribution; + + @JsonProperty("url") private String url; + + @JsonProperty("labels") private List labels; + + @JsonProperty("action") private String action; + + @JsonProperty("assignee") private Assignee assignee; + @JsonProperty("updated_by_id") private Long updatedById; + + @JsonProperty("merge_error") private String mergeError; + + @JsonProperty("merge_params") private Map mergeParams; + + @JsonProperty("merge_when_pipeline_succeeds") private Boolean mergeWhenPipelineSucceeds; + + @JsonProperty("merge_user_id") private Long mergeUserId; + + @JsonProperty("deleted_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date deletedAt; + + @JsonProperty("in_progress_merge_commit_sha") private String inProgressMergeCommitSha; + + @JsonProperty("lock_version") private Integer lockVersion; + @JsonProperty("last_edited_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastEditedAt; + + @JsonProperty("last_edited_by_id") private Long lastEditedById; + + @JsonProperty("head_pipeline_id") private Long headPipelineId; + + @JsonProperty("ref_fetched") private Boolean refFetched; + + @JsonProperty("merge_iid") private Long mergeIid; + + @JsonProperty("total_time_spent") private Integer totalTimeSpent; + + @JsonProperty("human_total_time_spent") private Duration humanTotalTimeSpent; + + @JsonProperty("time_change") private Integer timeChange; + + @JsonProperty("time_estimate") private Integer timeEstimate; + + @JsonProperty("human_time_estimate") private Duration humanTimeEstimate; + + @JsonProperty("human_time_change") private Duration humanTimeChange; + + @JsonProperty("assignee_ids") private List assigneeIds; + + @JsonProperty("reviewer_ids") private List reviewerIds; + + @JsonProperty("oldrev") private String oldrev; public Long getAssigneeId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventProject.java b/src/main/java/org/gitlab4j/api/webhook/EventProject.java index cccf45789..f2118f260 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventProject.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventProject.java @@ -3,23 +3,56 @@ import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventProject { + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("description") private String description; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("git_ssh_url") private String gitSshUrl; + + @JsonProperty("git_http_url") private String gitHttpUrl; + + @JsonProperty("namespace") private String namespace; + + @JsonProperty("visibility_level") private AccessLevel visibilityLevel; + + @JsonProperty("path_with_namespace") private String pathWithNamespace; + + @JsonProperty("default_branch") private String defaultBranch; + + @JsonProperty("ci_config_path") private String ciConfigPath; + + @JsonProperty("homepage") private String homepage; + + @JsonProperty("url") private String url; + + @JsonProperty("ssh_url") private String sshUrl; + + @JsonProperty("http_url") private String httpUrl; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java b/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java index 7bd5cb51f..ef010c416 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java @@ -4,10 +4,17 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventReleaseAssets { + @JsonProperty("count") private Integer count; + + @JsonProperty("links") private List links; + + @JsonProperty("sources") private List sources; public Integer getCount() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java b/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java index 2f3bc120a..8fa1c4c36 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java @@ -2,11 +2,23 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventReleaseLink { + + @JsonProperty("id") private Long id; + + @JsonProperty("external") private Boolean external; + + @JsonProperty("link_type") private String linkType; + + @JsonProperty("name") private String name; + + @JsonProperty("url") private String url; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java b/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java index 15862481c..30768c254 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java @@ -2,8 +2,13 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventReleaseSource { + @JsonProperty("format") private String format; + + @JsonProperty("url") private String url; public String getFormat() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventRepository.java b/src/main/java/org/gitlab4j/api/webhook/EventRepository.java index b9915f614..c7cfb2451 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventRepository.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventRepository.java @@ -3,14 +3,29 @@ import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventRepository { + @JsonProperty("name") private String name; + + @JsonProperty("url") private String url; + + @JsonProperty("description") private String description; + + @JsonProperty("homepage") private String homepage; + + @JsonProperty("git_http_url") private String git_http_url; + + @JsonProperty("git_ssh_url") private String git_ssh_url; + + @JsonProperty("visibility_level") private AccessLevel visibility_level; public String getName() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java b/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java index c81ed9bb9..b22f7ec9d 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java @@ -5,18 +5,45 @@ import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventSnippet { + @JsonProperty("id") private Long id; + + @JsonProperty("title") private String title; + + @JsonProperty("content") private String content; + + @JsonProperty("author_id") private Long authorId; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("file_name") private String fileName; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("type") private String type; + + @JsonProperty("visibility_level") private AccessLevel visibilityLevel; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventUser.java b/src/main/java/org/gitlab4j/api/webhook/EventUser.java index b45da199f..7d942bec5 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventUser.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventUser.java @@ -2,12 +2,23 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventUser { + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("username") private String username; + + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("email") private String email; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java b/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java index d542e06cf..60f342b89 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java @@ -5,37 +5,104 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventWorkItem { + @JsonProperty("author_id") private Long authorId; + + @JsonProperty("closed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date closedAt; + + @JsonProperty("confidential") private Boolean confidential; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date createdAt; + + @JsonProperty("description") private String description; + + @JsonProperty("due_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date dueDate; + + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("last_edited_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date lastEditedAt; + + @JsonProperty("last_edited_by_id") private Long lastEditedById; + + @JsonProperty("milestone_id") private Long milestoneId; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("relative_position") private Long relativePosition; + + @JsonProperty("state_id") private Long stateId; + + @JsonProperty("time_estimate") private Integer timeEstimate; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date updatedAt; + + @JsonProperty("updated_by_id") private Long updatedById; + + @JsonProperty("weight") private Integer weight; + + @JsonProperty("health_status") private String healthStatus; + + @JsonProperty("type") private String type; + + @JsonProperty("url") private String url; + + @JsonProperty("total_time_spent") private Integer totalTimeSpent; + + @JsonProperty("time_change") private Integer timeChange; + + @JsonProperty("assignee_ids") private List assigneeIds; + + @JsonProperty("assignee_id") private Long assigneeId; + + @JsonProperty("labels") private List labels; + + @JsonProperty("state") private String state; + + @JsonProperty("severity") private String severity; + + @JsonProperty("action") private String action; public Long getAuthorId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java b/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java index b5f5a5c24..6f667a319 100644 --- a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java @@ -12,18 +12,34 @@ public class ExternalStatusCheckEvent implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("object_kind") private String objectKind; + + @JsonProperty("event_type") private String eventType; + + @JsonProperty("user") private EventUser user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("labels") private List labels; + + @JsonProperty("changes") private MergeRequestChanges changes; + + @JsonProperty("assignees") private List assignees; + + @JsonProperty("external_approval_rule") private EventExternalStatusCheck externalApprovalRule; public String getObjectKind() { diff --git a/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java b/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java index 9e52adec7..5908f07a8 100644 --- a/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java +++ b/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java @@ -2,11 +2,18 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonProperty; + public class IssueChanges extends EventChanges { + @JsonProperty("due_date") private ChangeContainer dueDate; + + @JsonProperty("confidential") private ChangeContainer confidential; - private ChangeContainer heathStatus; + + @JsonProperty("health_status") + private ChangeContainer healthStatus; public ChangeContainer getDueDate() { return dueDate; @@ -25,10 +32,10 @@ public void setConfidential(ChangeContainer confidential) { } public ChangeContainer getHeathStatus() { - return heathStatus; + return healthStatus; } - public void setHeathStatus(ChangeContainer heathStatus) { - this.heathStatus = heathStatus; + public void setHeathStatus(ChangeContainer healthStatus) { + this.healthStatus = healthStatus; } } diff --git a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java b/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java index eb6de611c..59166b3ad 100644 --- a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java @@ -13,16 +13,28 @@ public class IssueEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Issue Hook"; public static final String OBJECT_KIND = "issue"; + @JsonProperty("user") private EventUser user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("assignees") private List assignees; + + @JsonProperty("assignee") private Assignee assignee; + + @JsonProperty("labels") private List labels; + + @JsonProperty("changes") private IssueChanges changes; public String getObjectKind() { diff --git a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java b/src/main/java/org/gitlab4j/api/webhook/JobEvent.java index 32c6e8705..e08e5bbca 100644 --- a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/JobEvent.java @@ -4,29 +4,69 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class JobEvent extends AbstractEvent { private static final long serialVersionUID = 1L; public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook"; public static final String OBJECT_KIND = "job"; + @JsonProperty("ref") private String ref; + + @JsonProperty("tag") private Boolean tag; + + @JsonProperty("before_sha") private String beforeSha; + + @JsonProperty("sha") private String sha; + + @JsonProperty("job_id") private Long jobId; + + @JsonProperty("job_name") private String jobName; + + @JsonProperty("job_stage") private String jobStage; + + @JsonProperty("job_status") private String jobStatus; + + @JsonProperty("job_started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date jobStartedAt; + + @JsonProperty("job_finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date jobFinishedAt; + + @JsonProperty("job_duration") private Integer jobDuration; + + @JsonProperty("job_allow_failure") private Boolean jobAllowFailure; + + @JsonProperty("job_failure_reason") private String jobFailureReason; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("project_name") private String projectName; + + @JsonProperty("user") private EventUser user; + + @JsonProperty("commit") private BuildCommit commit; + + @JsonProperty("repository") private EventRepository repository; @Override diff --git a/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java b/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java index 07061f9e5..d81478bd9 100644 --- a/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java +++ b/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java @@ -4,9 +4,14 @@ import org.gitlab4j.api.models.Reviewer; +import com.fasterxml.jackson.annotation.JsonProperty; + public class MergeRequestChanges extends EventChanges { + @JsonProperty("merge_status") private ChangeContainer mergeStatus; + + @JsonProperty("reviewers") private ChangeContainer> reviewers; public ChangeContainer getMergeStatus() { diff --git a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java b/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java index fae959248..bb96c5862 100644 --- a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java @@ -14,16 +14,28 @@ public class MergeRequestEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Merge Request Hook"; public static final String OBJECT_KIND = "merge_request"; + @JsonProperty("user") private EventUser user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("labels") private List labels; + + @JsonProperty("changes") private MergeRequestChanges changes; + + @JsonProperty("assignees") private List assignees; + + @JsonProperty("reviewers") private List reviewers; public String getObjectKind() { diff --git a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java index 9e9f5ed53..5970ac858 100644 --- a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java @@ -16,20 +16,31 @@ public class NoteEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Note Hook"; public static final String OBJECT_KIND = "note"; + @JsonProperty("user") private EventUser user; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("commit") private EventCommit commit; + + @JsonProperty("issue") private EventIssue issue; - @JsonProperty(value = "merge_request") + @JsonProperty("merge_request") private EventMergeRequest mergeRequest; + @JsonProperty("snippet") private EventSnippet snippet; @Override @@ -140,21 +151,52 @@ public String toString() { public static class ObjectAttributes { + @JsonProperty("id") private Long id; + + @JsonProperty("note") private String note; + + @JsonProperty("discussion_id") private String discussionId; + + @JsonProperty("type") private String type; + + @JsonProperty("noteable_type") private NoteableType noteableType; + + @JsonProperty("author_id") private Long authorId; + + @JsonProperty("created_at") private Date createdAt; + + @JsonProperty("updated_at") private Date updatedAt; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("attachment") private String attachment; + + @JsonProperty("line_code") private String lineCode; + + @JsonProperty("commit_id") private String commitId; + + @JsonProperty("noteable_id") private Long noteableId; + + @JsonProperty("system") private Boolean system; + + @JsonProperty("st_diff") private Diff stDiff; + + @JsonProperty("url") private String url; public Long getId() { diff --git a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java index 8b001941d..4687b620a 100644 --- a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java @@ -15,12 +15,19 @@ public class PipelineEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Pipeline Hook"; public static final String OBJECT_KIND = "pipeline"; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("user") private EventUser user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("commit") private EventCommit commit; + + @JsonProperty("jobs") private List jobs; public String getObjectKind() { diff --git a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java b/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java index 2fc16a702..1cd72ced0 100644 --- a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java @@ -2,22 +2,45 @@ import org.gitlab4j.api.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ReleaseEvent extends AbstractEvent { private static final long serialVersionUID = 1L; public static final String X_GITLAB_EVENT = "Release Hook"; public static final String OBJECT_KIND = "release"; + @JsonProperty("id") private Long id; + + @JsonProperty("created_at") private String createdAt; + + @JsonProperty("description") private String description; + + @JsonProperty("name") private String name; + + @JsonProperty("released_at") private String releasedAt; + + @JsonProperty("tag") private String tag; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("url") private String url; + + @JsonProperty("action") private String action; + + @JsonProperty("assets") private EventReleaseAssets assets; + + @JsonProperty("commit") private EventCommit commit; @Override diff --git a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java b/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java index e0647129d..b74e25c4d 100644 --- a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java @@ -10,8 +10,13 @@ public class WikiPageEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Wiki Page Hook"; public static final String OBJECT_KIND = "wiki_page"; + @JsonProperty("user") private EventUser user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("wiki") private Wiki wiki; @JsonProperty(value = "object_attributes") diff --git a/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java b/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java index 6bb3ac84f..11c2567de 100644 --- a/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java +++ b/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java @@ -2,16 +2,21 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonProperty; + public class WorkItemChanges extends EventChanges { - private ChangeContainer heathStatus; + @JsonProperty("health_status") + private ChangeContainer healthStatus; + + @JsonProperty("last_edited_at") private ChangeContainer lastEditedAt; - public ChangeContainer getHeathStatus() { - return heathStatus; + public ChangeContainer getHealthStatus() { + return healthStatus; } - public void setHeathStatus(ChangeContainer heathStatus) { - this.heathStatus = heathStatus; + public void setHealthStatus(ChangeContainer healthStatus) { + this.healthStatus = healthStatus; } public ChangeContainer getLastEditedAt() { diff --git a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java b/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java index 1f30023e7..59aa3da24 100644 --- a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java @@ -13,14 +13,22 @@ public class WorkItemEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Issue Hook"; public static final String OBJECT_KIND = "work_item"; + @JsonProperty("user") private User user; + + @JsonProperty("project") private EventProject project; + + @JsonProperty("repository") private EventRepository repository; - @JsonProperty(value = "object_attributes") + @JsonProperty("object_attributes") private ObjectAttributes objectAttributes; + @JsonProperty("labels") private List labels; + + @JsonProperty("changes") private WorkItemChanges changes; public String getObjectKind() { From 2f9098b8e4eb581433358e296858b0aed9d098d7 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sat, 7 Dec 2024 00:45:21 -0500 Subject: [PATCH 5/8] system hooks using @JsonProperty and @JsonFormat --- .../systemhooks/AbstractSystemHookEvent.java | 6 ++++ .../GroupMemberSystemHookEvent.java | 25 ++++++++++++++++ .../api/systemhooks/GroupSystemHookEvent.java | 25 ++++++++++++++++ .../api/systemhooks/KeySystemHookEvent.java | 15 ++++++++++ .../MergeRequestSystemHookEvent.java | 4 +++ .../systemhooks/ProjectSystemHookEvent.java | 25 ++++++++++++++++ .../api/systemhooks/RepositoryChange.java | 6 ++++ .../RepositorySystemHookEvent.java | 16 ++++++++++ .../TeamMemberSystemHookEvent.java | 30 ++++++++++++++++++- .../api/systemhooks/UserSystemHookEvent.java | 21 +++++++++++++ 10 files changed, 172 insertions(+), 1 deletion(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java index 6d30d4696..cecf38de8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java @@ -1,12 +1,18 @@ package org.gitlab4j.api.systemhooks; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public abstract class AbstractSystemHookEvent implements SystemHookEvent { private static final long serialVersionUID = 1L; + @JsonProperty("request_url") private String requestUrl; + + @JsonProperty("request_query_string") private String requestQueryString; + + @JsonProperty("request_secret_token") private String requestSecretToken; @Override diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java index c85a5db2a..a3a2c95d8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { @@ -10,16 +12,39 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { public static final String NEW_GROUP_MEMBER_EVENT = "user_add_to_group"; public static final String GROUP_MEMBER_REMOVED_EVENT = "user_remove_from_group"; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("event_name") private String eventName; + + @JsonProperty("group_access") private String groupAccess; + + @JsonProperty("group_name") private String groupName; + + @JsonProperty("group_path") private String groupPath; + + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("user_email") private String userEmail; + + @JsonProperty("user_name") private String userName; + + @JsonProperty("user_username") private String userUsername; + + @JsonProperty("user_id") private Long userId; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java index 04af93545..c40bb1de0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; public class GroupSystemHookEvent extends AbstractSystemHookEvent { @@ -11,16 +13,39 @@ public class GroupSystemHookEvent extends AbstractSystemHookEvent { public static final String GROUP_DESTROY_EVENT = "group_destroy"; public static final String GROUP_RENAME_EVENT = "group_rename"; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("event_name") private String eventName; + + @JsonProperty("name") private String name; + + @JsonProperty("path") private String path; + + @JsonProperty("full_path") private String fullPath; + + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("owner_email") private String ownerEmail; + + @JsonProperty("owner_name") private String ownerName; + + @JsonProperty("old_path") private String oldPath; + + @JsonProperty("old_full_path") private String oldFullPath; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java index 1c31a0cdc..bf111d5a6 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; public class KeySystemHookEvent extends AbstractSystemHookEvent { @@ -10,11 +12,24 @@ public class KeySystemHookEvent extends AbstractSystemHookEvent { public static final String KEY_CREATE_EVENT = "key_create"; public static final String KEY_DESTROY_EVENT = "key_destroy"; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("event_name") private String eventName; + + @JsonProperty("username") private String username; + + @JsonProperty("key") private String key; + + @JsonProperty("id") private Long id; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java index ed09c445c..ddcc56c17 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java @@ -1,5 +1,6 @@ package org.gitlab4j.api.systemhooks; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.webhook.MergeRequestEvent; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -10,7 +11,10 @@ public class MergeRequestSystemHookEvent extends MergeRequestEvent implements Sy public static final String X_GITLAB_EVENT = "System Hook"; public static final String MERGE_REQUEST_EVENT = "merge_request"; + @JsonProperty("event_type") private String eventType; + + @JsonProperty("event_name") private String eventName; @Override diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java index ef832ae9d..50cd496ef 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.JacksonJson; @@ -14,16 +16,39 @@ public class ProjectSystemHookEvent extends AbstractSystemHookEvent { public static final String PROJECT_TRANSFER_EVENT = "project_transfer"; public static final String PROJECT_UPDATE_EVENT = "project_update"; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("event_name") private String eventName; + + @JsonProperty("name") private String name; + + @JsonProperty("owner_email") private String ownerEmail; + + @JsonProperty("owner_name") private String ownerName; + + @JsonProperty("path") private String path; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("path_with_namespace") private String pathWithNamespace; + + @JsonProperty("project_visibility") private Visibility projectVisibility; + + @JsonProperty("old_path_with_namespace") private String oldPathWithNamespace; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java index b575b8932..fd78f8257 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java @@ -1,11 +1,17 @@ package org.gitlab4j.api.systemhooks; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; public class RepositoryChange { + @JsonProperty("after") private String after; + + @JsonProperty("before") private String before; + + @JsonProperty("ref") private String ref; public String getAfter() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java index 9fd3ef3e6..79815bd87 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java @@ -2,6 +2,7 @@ import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.webhook.EventProject; import org.gitlab4j.models.utils.JacksonJson; @@ -9,16 +10,31 @@ public class RepositorySystemHookEvent extends AbstractSystemHookEvent { public static final String REPOSITORY_UPDATE_EVENT = "repository_update"; + @JsonProperty("event_name") private String eventName; + + @JsonProperty("user_id") private Long userId; + + @JsonProperty("user_name") private String userName; + + @JsonProperty("user_email") private String userEmail; + + @JsonProperty("user_avatar") private String userAvatar; + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("project") private EventProject project; + @JsonProperty("changes") private List changes; + + @JsonProperty("refs") private List refs; @Override diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java index 7e5ba0d33..dd1eaa39e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.JacksonJson; @@ -11,20 +13,46 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { public static final String NEW_TEAM_MEMBER_EVENT = "user_add_to_team"; public static final String TEAM_MEMBER_REMOVED_EVENT = "user_remove_from_team"; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("event_name") private String eventName; + + @JsonProperty("access_level") private String accessLevel; + + @JsonProperty("project_name") private String projectName; + + @JsonProperty("project_path") private String projectPath; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("project_path_with_namespace") private String projectPathWithNamespace; + + @JsonProperty("user_email") private String userEmail; + + @JsonProperty("user_name") private String userName; + + @JsonProperty("user_username") private String userUsername; + + @JsonProperty("user_id") private Long userId; - private Visibility projectVisibility; + @JsonProperty("project_visibility") + private Visibility projectVisibility; public Date getCreatedAt() { return createdAt; } diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java index 854755336..e0d8f6851 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java @@ -2,6 +2,8 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; public class UserSystemHookEvent extends AbstractSystemHookEvent { @@ -12,14 +14,33 @@ public class UserSystemHookEvent extends AbstractSystemHookEvent { public static final String USER_RENAME_EVENT = "user_rename"; public static final String USER_FAILED_LOGIN_EVENT = "user_failed_login"; + @JsonProperty("event_name") private String eventName; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("email") private String email; + + @JsonProperty("name") private String name; + + @JsonProperty("username") private String username; + + @JsonProperty("user_id") private Long userId; + + @JsonProperty("old_username") private String oldUsername; + + @JsonProperty("state") private String state; @Override From 90a8a9075e7b702a235e561870c236c375388eb2 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sat, 7 Dec 2024 01:12:20 -0500 Subject: [PATCH 6/8] cleanup --- .../org/gitlab4j/api/models/AbstractEpic.java | 42 +++++++++-- .../gitlab4j/api/models/AbstractGroup.java | 12 ++++ .../gitlab4j/api/models/AbstractIssue.java | 72 +++++++++++++++++++ .../api/models/AbstractMinimalEpic.java | 15 ++++ .../org/gitlab4j/api/models/AbstractUser.java | 18 +++++ .../api/models/AcceptMergeRequestParams.java | 13 ++++ .../GroupMemberSystemHookEvent.java | 3 +- .../api/systemhooks/GroupSystemHookEvent.java | 3 +- .../api/systemhooks/KeySystemHookEvent.java | 3 +- .../MergeRequestSystemHookEvent.java | 2 +- .../systemhooks/ProjectSystemHookEvent.java | 5 +- .../api/systemhooks/RepositoryChange.java | 3 +- .../RepositorySystemHookEvent.java | 3 +- .../TeamMemberSystemHookEvent.java | 6 +- .../api/systemhooks/UserSystemHookEvent.java | 3 +- .../gitlab4j/api/webhook/EventChanges.java | 1 - .../gitlab4j/models/TestGitLabApiEvents.java | 2 +- 17 files changed, 189 insertions(+), 17 deletions(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java index d63d37a71..b89c35a84 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java @@ -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> extends AbstractMinimalEpic implements Serializable { private static final long serialVersionUID = 1L; @@ -38,21 +35,58 @@ public String toString() { } } + @JsonProperty("parent_iid") private Long parentIid; + + @JsonProperty("description") private String description; + + @JsonProperty("state") private EpicState state; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("references") private References references; + + @JsonProperty("author") private Author author; + + @JsonProperty("labels") private List labels; + + @JsonProperty("start_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date startDate; + + @JsonProperty("due_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date dueDate; + + @JsonProperty("end_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date endDate; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("closed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date closedAt; + + @JsonProperty("downvotes") private Integer downvotes; + + @JsonProperty("upvotes") private Integer upvotes; + + @JsonProperty("color") private String color; @JsonProperty("_links") diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java index 9337dbc4b..73b3ce3c4 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java @@ -5,16 +5,28 @@ 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> implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("full_name") private String fullName; + + @JsonProperty("full_path") private String fullPath; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java index 63166409a..17cd17744 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java @@ -7,6 +7,7 @@ import org.gitlab4j.models.Constants.IssueState; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.node.IntNode; @@ -45,15 +46,38 @@ public String toString() { } } + @JsonProperty("assignee") private Assignee assignee; + + @JsonProperty("assignees") private List assignees; + + @JsonProperty("author") private Author author; + + @JsonProperty("confidential") private Boolean confidential; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("closed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date closedAt; + + @JsonProperty("closed_by") private User closedBy; + + @JsonProperty("description") private String description; + + @JsonProperty("due_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date dueDate; @JsonProperty("id") @@ -65,31 +89,79 @@ public String toString() { @JsonIgnore private Long id; + @JsonProperty("iid") private Long iid; + + @JsonProperty("labels") private List labels; + + @JsonProperty("milestone") private Milestone milestone; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("state") private IssueState state; + + @JsonProperty("title") private String title; + + @JsonProperty("user_notes_count") private Integer userNotesCount; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("references") private References references; + + @JsonProperty("weight") private Integer weight; + + @JsonProperty("discussion_locked") private Boolean discussionLocked; + + @JsonProperty("time_stats") private TimeStats timeStats; + + @JsonProperty("severity") private String severity; + + @JsonProperty("issue_type") private String issueType; + + @JsonProperty("epic") private IssueEpic epic; + @JsonProperty("upvotes") private Integer upvotes; + + @JsonProperty("downvotes") private Integer downvotes; + + @JsonProperty("merge_requests_count") private Integer mergeRequestsCount; + + @JsonProperty("has_tasks") private Boolean hasTasks; + + @JsonProperty("task_status") private String taskStatus; + + @JsonProperty("imported") private Boolean imported; + + @JsonProperty("imported_from") private String importedFrom; + + @JsonProperty("iteration") private Iteration iteration; + + @JsonProperty("task_completion_status") private TaskCompletionStatus taskCompletionStatus; + + @JsonProperty("health_status") private String healthStatus; public Assignee getAssignee() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java index bdfe2bf27..488d421a7 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java @@ -4,15 +4,30 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AbstractMinimalEpic> implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("parent_id") private Long parentId; + + @JsonProperty("title") private String title; + + @JsonProperty("reference") private String reference; + + @JsonProperty("url") private String url; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java index fe22106e5..7ff1101eb 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java @@ -5,19 +5,37 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public abstract class AbstractUser> implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("email") private String email; + + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("state") private String state; + + @JsonProperty("username") private String username; + + @JsonProperty("web_url") private String webUrl; public String getAvatarUrl() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java index 63d63a7b3..45f16bef9 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java @@ -4,14 +4,27 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AcceptMergeRequestParams implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("merge_commit_message") private String mergeCommitMessage; + + @JsonProperty("merge_when_pipeline_succeeds") private Boolean mergeWhenPipelineSucceeds; + + @JsonProperty("sha") private String sha; + + @JsonProperty("should_remove_source_branch") private Boolean shouldRemoveSourceBranch; + + @JsonProperty("squash") private Boolean squash; + + @JsonProperty("squash_commit_message") private String squashCommitMessage; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java index a3a2c95d8..ef5c74f00 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java @@ -2,9 +2,10 @@ import java.util.Date; +import org.gitlab4j.models.utils.JacksonJson; + import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; -import org.gitlab4j.models.utils.JacksonJson; public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java index c40bb1de0..d6ed77d27 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java @@ -2,9 +2,10 @@ import java.util.Date; +import org.gitlab4j.models.utils.JacksonJson; + import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; -import org.gitlab4j.models.utils.JacksonJson; public class GroupSystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java index bf111d5a6..632b265f8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java @@ -2,9 +2,10 @@ import java.util.Date; +import org.gitlab4j.models.utils.JacksonJson; + import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; -import org.gitlab4j.models.utils.JacksonJson; public class KeySystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java index ddcc56c17..41851b012 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java @@ -1,9 +1,9 @@ package org.gitlab4j.api.systemhooks; -import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.webhook.MergeRequestEvent; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class MergeRequestSystemHookEvent extends MergeRequestEvent implements SystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java index 50cd496ef..6421a7e28 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java @@ -2,11 +2,12 @@ import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProjectSystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java index fd78f8257..c1c542d0d 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java @@ -1,8 +1,9 @@ package org.gitlab4j.api.systemhooks; -import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RepositoryChange { @JsonProperty("after") diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java index 79815bd87..29ca4af8b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java @@ -2,10 +2,11 @@ import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.webhook.EventProject; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RepositorySystemHookEvent extends AbstractSystemHookEvent { public static final String REPOSITORY_UPDATE_EVENT = "repository_update"; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java index dd1eaa39e..3ae05b134 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java @@ -2,11 +2,12 @@ import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; @@ -53,6 +54,7 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { @JsonProperty("project_visibility") private Visibility projectVisibility; + public Date getCreatedAt() { return createdAt; } diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java index e0d8f6851..4f17abbc4 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java @@ -2,9 +2,10 @@ import java.util.Date; +import org.gitlab4j.models.utils.JacksonJson; + import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; -import org.gitlab4j.models.utils.JacksonJson; public class UserSystemHookEvent extends AbstractSystemHookEvent { private static final long serialVersionUID = 1L; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java index 18740abeb..9f14905bc 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java @@ -47,7 +47,6 @@ public abstract class EventChanges { @JsonProperty("total_time_spent") private ChangeContainer totalTimeSpent; - @JsonProperty("other_properties") private Map> otherProperties = new LinkedHashMap<>(); public ChangeContainer getAuthorId() { diff --git a/gitlab4j-models/src/test/java/org/gitlab4j/models/TestGitLabApiEvents.java b/gitlab4j-models/src/test/java/org/gitlab4j/models/TestGitLabApiEvents.java index 6887544fe..a4a164b18 100644 --- a/gitlab4j-models/src/test/java/org/gitlab4j/models/TestGitLabApiEvents.java +++ b/gitlab4j-models/src/test/java/org/gitlab4j/models/TestGitLabApiEvents.java @@ -69,7 +69,7 @@ public void testWorkItemEvent() throws Exception { WorkItemEvent workItemEvent = unmarshalResource(WorkItemEvent.class, "workitem-event.json"); assertTrue(compareJson(workItemEvent, "workitem-event.json")); - ChangeContainer change = workItemEvent.getChanges().get("health_status"); + ChangeContainer change = workItemEvent.getChanges().getHealthStatus(); assertNotNull(change); assertEquals("on_track", change.getPrevious()); assertEquals("needs_attention", change.getCurrent()); From 72e86a674eed5469ef3959d79938170e580f5166 Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Sat, 7 Dec 2024 21:32:56 -0500 Subject: [PATCH 7/8] enriching model annotation metadata with @JsonProperty and @JsonFormat where appropriate --- .../org/gitlab4j/api/models/AbstractEpic.java | 57 +++++++ .../gitlab4j/api/models/AbstractGroup.java | 18 ++ .../gitlab4j/api/models/AbstractIssue.java | 118 +++++++++++++ .../api/models/AbstractMinimalEpic.java | 21 +++ .../org/gitlab4j/api/models/AbstractUser.java | 25 +++ .../api/models/AcceptMergeRequestParams.java | 18 ++ .../gitlab4j/api/models/AccessRequest.java | 14 ++ .../org/gitlab4j/api/models/AllowedTo.java | 16 ++ .../org/gitlab4j/api/models/Application.java | 21 +++ .../api/models/ApplicationSettings.java | 25 +++ .../org/gitlab4j/api/models/ApprovalRule.java | 56 +++++++ .../api/models/ApprovalRuleParams.java | 46 ++++++ .../gitlab4j/api/models/ApprovalState.java | 11 ++ .../org/gitlab4j/api/models/ApprovedBy.java | 10 ++ .../org/gitlab4j/api/models/Artifact.java | 20 +++ .../gitlab4j/api/models/ArtifactsFile.java | 11 ++ .../java/org/gitlab4j/api/models/Assets.java | 49 ++++++ .../org/gitlab4j/api/models/AuditEvent.java | 34 ++++ .../gitlab4j/api/models/AuditEventDetail.java | 56 +++++++ .../org/gitlab4j/api/models/AwardEmoji.java | 40 +++++ .../java/org/gitlab4j/api/models/Badge.java | 35 ++++ .../java/org/gitlab4j/api/models/Blame.java | 11 ++ .../java/org/gitlab4j/api/models/Board.java | 26 +++ .../org/gitlab4j/api/models/BoardList.java | 16 ++ .../java/org/gitlab4j/api/models/Branch.java | 46 ++++++ .../api/models/BranchAccessLevel.java | 26 +++ .../java/org/gitlab4j/api/models/Bridge.java | 105 ++++++++++++ .../gitlab4j/api/models/ChangelogPayload.java | 43 +++++ .../java/org/gitlab4j/api/models/Changes.java | 35 ++++ .../java/org/gitlab4j/api/models/Comment.java | 34 ++++ .../java/org/gitlab4j/api/models/Commit.java | 110 ++++++++++++ .../org/gitlab4j/api/models/CommitAction.java | 35 ++++ .../gitlab4j/api/models/CommitPayload.java | 51 ++++++ .../org/gitlab4j/api/models/CommitRef.java | 10 ++ .../org/gitlab4j/api/models/CommitStats.java | 16 ++ .../org/gitlab4j/api/models/CommitStatus.java | 78 +++++++++ .../api/models/CommitStatusFilter.java | 20 +++ .../gitlab4j/api/models/CompareResults.java | 27 ++- .../org/gitlab4j/api/models/Contributor.java | 16 ++ .../gitlab4j/api/models/CreatedChildEpic.java | 21 +++ .../gitlab4j/api/models/CustomAttribute.java | 11 ++ .../org/gitlab4j/api/models/DeployKey.java | 29 ++++ .../org/gitlab4j/api/models/DeployToken.java | 34 ++++ .../org/gitlab4j/api/models/Deployable.java | 100 +++++++++++ .../org/gitlab4j/api/models/Deployment.java | 56 +++++++ .../gitlab4j/api/models/DeploymentFilter.java | 12 +- .../gitlab4j/api/models/DetailedStatus.java | 46 ++++++ .../java/org/gitlab4j/api/models/Diff.java | 35 ++++ .../java/org/gitlab4j/api/models/DiffRef.java | 16 ++ .../org/gitlab4j/api/models/Discussion.java | 16 ++ .../api/models/DownstreamPipeline.java | 41 +++++ .../org/gitlab4j/api/models/Duration.java | 10 ++ .../java/org/gitlab4j/api/models/Email.java | 11 ++ .../org/gitlab4j/api/models/Environment.java | 43 +++++ .../java/org/gitlab4j/api/models/Epic.java | 24 +++ .../org/gitlab4j/api/models/EpicFilter.java | 77 +++++++++ .../org/gitlab4j/api/models/EpicIssue.java | 12 ++ .../gitlab4j/api/models/EpicIssueLink.java | 21 +++ .../java/org/gitlab4j/api/models/Event.java | 78 +++++++++ .../org/gitlab4j/api/models/EventData.java | 41 +++++ .../java/org/gitlab4j/api/models/Exists.java | 3 + .../org/gitlab4j/api/models/ExportStatus.java | 49 +++++- .../api/models/ExternalStatusCheck.java | 26 +++ .../ExternalStatusCheckProtectedBranch.java | 36 ++++ .../api/models/ExternalStatusCheckResult.java | 16 ++ .../api/models/ExternalStatusCheckStatus.java | 20 +++ .../org/gitlab4j/api/models/FileUpload.java | 16 ++ .../gitlab4j/api/models/GitLabCiTemplate.java | 11 ++ .../api/models/GitLabCiTemplateElement.java | 11 ++ .../java/org/gitlab4j/api/models/GpgKey.java | 19 +++ .../org/gitlab4j/api/models/GpgSignature.java | 31 ++++ .../java/org/gitlab4j/api/models/Group.java | 121 ++++++++++++++ .../gitlab4j/api/models/GroupAccessToken.java | 3 + .../org/gitlab4j/api/models/GroupFilter.java | 56 +++++++ .../org/gitlab4j/api/models/GroupHook.java | 149 +++++++++++++++++ .../gitlab4j/api/models/GroupHookParams.java | 121 ++++++++++++++ .../org/gitlab4j/api/models/GroupParams.java | 106 ++++++++++++ .../api/models/GroupProjectsFilter.java | 66 ++++++++ .../gitlab4j/api/models/HealthCheckInfo.java | 29 ++++ .../gitlab4j/api/models/HealthCheckItem.java | 16 ++ .../org/gitlab4j/api/models/Identity.java | 16 ++ .../api/models/ImpersonationToken.java | 62 +++++++ .../org/gitlab4j/api/models/ImportStatus.java | 48 ++++++ .../java/org/gitlab4j/api/models/Issue.java | 3 + .../org/gitlab4j/api/models/IssueEvent.java | 33 ++++ .../org/gitlab4j/api/models/IssueFilter.java | 26 ++- .../org/gitlab4j/api/models/IssueLink.java | 16 ++ .../gitlab4j/api/models/IssuesStatistics.java | 17 ++ .../api/models/IssuesStatisticsFilter.java | 75 +++++++++ .../org/gitlab4j/api/models/Iteration.java | 69 ++++++++ .../gitlab4j/api/models/IterationFilter.java | 12 +- .../java/org/gitlab4j/api/models/Job.java | 59 +++++++ .../org/gitlab4j/api/models/JobAttribute.java | 5 + .../java/org/gitlab4j/api/models/Key.java | 13 ++ .../java/org/gitlab4j/api/models/Label.java | 22 +++ .../org/gitlab4j/api/models/LabelEvent.java | 14 ++ .../gitlab4j/api/models/LdapGroupLink.java | 6 + .../java/org/gitlab4j/api/models/License.java | 29 ++++ .../gitlab4j/api/models/LicenseTemplate.java | 23 +++ .../java/org/gitlab4j/api/models/Link.java | 7 + .../org/gitlab4j/api/models/LinkedIssue.java | 12 ++ .../org/gitlab4j/api/models/Markdown.java | 3 + .../java/org/gitlab4j/api/models/Member.java | 9 + .../org/gitlab4j/api/models/Membership.java | 9 + .../org/gitlab4j/api/models/MergeRequest.java | 126 +++++++++++++- .../gitlab4j/api/models/MergeRequestDiff.java | 5 + .../api/models/MergeRequestFilter.java | 51 +++++- .../api/models/MergeRequestParams.java | 33 ++++ .../api/models/MergeRequestVersion.java | 19 +++ .../org/gitlab4j/api/models/Metadata.java | 9 + .../org/gitlab4j/api/models/Milestone.java | 26 +++ .../org/gitlab4j/api/models/Namespace.java | 17 ++ .../java/org/gitlab4j/api/models/Note.java | 49 +++++- .../api/models/NotificationSettings.java | 29 ++++ .../api/models/OauthTokenResponse.java | 11 ++ .../java/org/gitlab4j/api/models/Package.java | 13 ++ .../org/gitlab4j/api/models/PackageFile.java | 19 +++ .../gitlab4j/api/models/PackageFilter.java | 17 ++ .../org/gitlab4j/api/models/Permissions.java | 5 + .../api/models/PersonalAccessToken.java | 22 +++ .../org/gitlab4j/api/models/Pipeline.java | 51 ++++++ .../gitlab4j/api/models/PipelineFilter.java | 24 ++- .../gitlab4j/api/models/PipelineSchedule.java | 29 ++++ .../org/gitlab4j/api/models/Position.java | 22 +++ .../java/org/gitlab4j/api/models/Project.java | 156 +++++++++++++++++- .../gitlab4j/api/models/ProjectAccess.java | 5 + .../api/models/ProjectAccessToken.java | 27 +++ .../api/models/ProjectApprovalsConfig.java | 14 ++ .../gitlab4j/api/models/ProjectFetches.java | 7 + .../gitlab4j/api/models/ProjectFilter.java | 56 +++++++ .../api/models/ProjectGroupsFilter.java | 11 ++ .../org/gitlab4j/api/models/ProjectHook.java | 44 +++++ .../gitlab4j/api/models/ProjectLicense.java | 11 ++ .../api/models/ProjectStatistics.java | 29 +++- .../gitlab4j/api/models/ProtectedBranch.java | 15 ++ .../org/gitlab4j/api/models/ProtectedTag.java | 8 + .../org/gitlab4j/api/models/PushData.java | 15 ++ .../org/gitlab4j/api/models/PushRules.java | 33 ++++ .../org/gitlab4j/api/models/References.java | 3 + .../api/models/RegistryRepository.java | 13 ++ .../api/models/RegistryRepositoryTag.java | 19 +++ .../org/gitlab4j/api/models/RelatedEpic.java | 19 +++ .../gitlab4j/api/models/RelatedEpicLink.java | 16 ++ .../java/org/gitlab4j/api/models/Release.java | 28 ++++ .../api/models/ReleaseLinkParams.java | 11 ++ .../gitlab4j/api/models/ReleaseParams.java | 17 ++ .../org/gitlab4j/api/models/RemoteMirror.java | 25 +++ .../org/gitlab4j/api/models/Repository.java | 9 + .../api/models/RepositoryArchiveParams.java | 5 + .../gitlab4j/api/models/RepositoryFile.java | 20 +++ .../api/models/RepositoryFileResponse.java | 5 + .../java/org/gitlab4j/api/models/Runner.java | 17 +- .../org/gitlab4j/api/models/RunnerDetail.java | 20 +++ .../gitlab4j/api/models/SamlGroupLink.java | 5 + .../org/gitlab4j/api/models/SearchBlob.java | 15 ++ .../org/gitlab4j/api/models/SharedGroup.java | 8 + .../java/org/gitlab4j/api/models/Snippet.java | 28 ++++ .../java/org/gitlab4j/api/models/SshKey.java | 14 ++ .../org/gitlab4j/api/models/SystemHook.java | 19 +++ .../java/org/gitlab4j/api/models/Tag.java | 13 ++ .../api/models/TaskCompletionStatus.java | 5 + .../org/gitlab4j/api/models/TimeStats.java | 9 + .../java/org/gitlab4j/api/models/Todo.java | 20 +++ .../java/org/gitlab4j/api/models/Topic.java | 8 + .../org/gitlab4j/api/models/TopicParams.java | 7 + .../org/gitlab4j/api/models/TreeItem.java | 11 ++ .../java/org/gitlab4j/api/models/Trigger.java | 19 +++ .../gitlab4j/api/models/UploadedByUser.java | 7 + .../org/gitlab4j/api/models/UploadedFile.java | 13 ++ .../java/org/gitlab4j/api/models/User.java | 68 ++++++++ .../org/gitlab4j/api/models/Variable.java | 6 + .../java/org/gitlab4j/api/models/Version.java | 5 + .../gitlab4j/api/models/WikiAttachment.java | 9 + .../org/gitlab4j/api/models/WikiPage.java | 9 + 174 files changed, 5130 insertions(+), 36 deletions(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java index b89c35a84..29aa0156b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java @@ -35,60 +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 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 links; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java index 73b3ce3c4..6c96c9509 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java @@ -11,21 +11,39 @@ public abstract class AbstractGroup> 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; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java index 17cd17744..93f4ab0ae 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java @@ -46,121 +46,239 @@ public String toString() { } } + /** + * The assignee associated with the issue. + */ @JsonProperty("assignee") private Assignee assignee; + /** + * The list of assignees associated with the issue. + */ @JsonProperty("assignees") private List assignees; + /** + * The author of the issue. + */ @JsonProperty("author") private Author author; + /** + * Indicates whether the issue is confidential. + */ @JsonProperty("confidential") private Boolean confidential; + /** + * The date when the issue 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 issue 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 issue 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 user who closed the issue. + */ @JsonProperty("closed_by") private User closedBy; + /** + * The description of the issue. + */ @JsonProperty("description") private String description; + /** + * The due date of the issue. + * Expected in format "yyyy-MM-dd". + */ @JsonProperty("due_date") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date dueDate; + /** + * The actual ID of the issue. + */ @JsonProperty("id") private ValueNode actualId; + /** + * The external ID of the issue (ignored during serialization). + */ @JsonIgnore private String externalId; + /** + * The internal ID of the issue (ignored during serialization). + */ @JsonIgnore private Long id; + /** + * The internal identifier for the issue. + */ @JsonProperty("iid") private Long iid; + /** + * The labels associated with the issue. + */ @JsonProperty("labels") private List labels; + /** + * The milestone associated with the issue. + */ @JsonProperty("milestone") private Milestone milestone; + /** + * The project ID associated with the issue. + */ @JsonProperty("project_id") private Long projectId; + /** + * The state of the issue (e.g., open, closed). + */ @JsonProperty("state") private IssueState state; + /** + * The title of the issue. + */ @JsonProperty("title") private String title; + /** + * The count of user notes on the issue. + */ @JsonProperty("user_notes_count") private Integer userNotesCount; + /** + * The web URL of the issue. + */ @JsonProperty("web_url") private String webUrl; + /** + * The references associated with the issue. + */ @JsonProperty("references") private References references; + /** + * The weight of the issue. + */ @JsonProperty("weight") private Integer weight; + /** + * Indicates whether discussions on the issue are locked. + */ @JsonProperty("discussion_locked") private Boolean discussionLocked; + /** + * The time statistics associated with the issue. + */ @JsonProperty("time_stats") private TimeStats timeStats; + /** + * The severity of the issue. + */ @JsonProperty("severity") private String severity; + /** + * The type of the issue. + */ @JsonProperty("issue_type") private String issueType; + /** + * The epic associated with the issue. + */ @JsonProperty("epic") private IssueEpic epic; + /** + * The upvotes for the issue. + */ @JsonProperty("upvotes") private Integer upvotes; + /** + * The downvotes for the issue. + */ @JsonProperty("downvotes") private Integer downvotes; + /** + * The number of merge requests associated with the issue. + */ @JsonProperty("merge_requests_count") private Integer mergeRequestsCount; + /** + * Indicates whether the issue has tasks. + */ @JsonProperty("has_tasks") private Boolean hasTasks; + /** + * The task status associated with the issue. + */ @JsonProperty("task_status") private String taskStatus; + /** + * Indicates whether the issue has been imported. + */ @JsonProperty("imported") private Boolean imported; + /** + * The source from which the issue was imported. + */ @JsonProperty("imported_from") private String importedFrom; + /** + * The iteration associated with the issue. + */ @JsonProperty("iteration") private Iteration iteration; + /** + * The task completion status associated with the issue. + */ @JsonProperty("task_completion_status") private TaskCompletionStatus taskCompletionStatus; + /** + * The health status associated with the issue. + */ @JsonProperty("health_status") private String healthStatus; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java index 488d421a7..43ce50c90 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java @@ -9,24 +9,45 @@ public class AbstractMinimalEpic> implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the epic. + */ @JsonProperty("id") private Long id; + /** + * The internal identifier of the epic. + */ @JsonProperty("iid") private Long iid; + /** + * The ID of the group associated with the epic. + */ @JsonProperty("group_id") private Long groupId; + /** + * The ID of the parent epic. + */ @JsonProperty("parent_id") private Long parentId; + /** + * The title of the epic. + */ @JsonProperty("title") private String title; + /** + * The reference of the epic. + */ @JsonProperty("reference") private String reference; + /** + * The URL of the epic. + */ @JsonProperty("url") private String url; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java index 7ff1101eb..0f9f9ea7c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java @@ -13,28 +13,53 @@ public abstract class AbstractUser> implements Serializable { private static final long serialVersionUID = 1L; + /** + * The avatar URL associated with the user. + */ @JsonProperty("avatar_url") private String avatarUrl; + /** + * The date when the user 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 email address associated with the user. + */ @JsonProperty("email") private String email; + /** + * The unique identifier of the user. + */ @JsonProperty("id") private Long id; + /** + * The name of the user. + */ @JsonProperty("name") private String name; + /** + * The state of the user (e.g., active, inactive). + */ @JsonProperty("state") private String state; + /** + * The username associated with the user. + */ @JsonProperty("username") private String username; + /** + * The web URL of the user's profile. + */ @JsonProperty("web_url") private String webUrl; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java index 45f16bef9..1e4242dbb 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java @@ -9,21 +9,39 @@ public class AcceptMergeRequestParams implements Serializable { private static final long serialVersionUID = 1L; + /** + * The commit message for the merge. + */ @JsonProperty("merge_commit_message") private String mergeCommitMessage; + /** + * Indicates whether the merge should occur when the pipeline succeeds. + */ @JsonProperty("merge_when_pipeline_succeeds") private Boolean mergeWhenPipelineSucceeds; + /** + * The SHA associated with the merge request. + */ @JsonProperty("sha") private String sha; + /** + * Indicates whether the source branch should be removed after merging. + */ @JsonProperty("should_remove_source_branch") private Boolean shouldRemoveSourceBranch; + /** + * Indicates whether the merge should be squashed. + */ @JsonProperty("squash") private Boolean squash; + /** + * The commit message for the squash merge. + */ @JsonProperty("squash_commit_message") private String squashCommitMessage; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java index a6eda0b24..980fdf392 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java @@ -2,10 +2,24 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AccessRequest extends AbstractUser { private static final long serialVersionUID = 1L; + /** + * The date when the access request was made. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("requested_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date requestedAt; + + /** + * The access level requested. + */ + @JsonProperty("access_level") private AccessLevel accessLevel; public Date getRequestedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java index f42c12bac..93f5bfe53 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java @@ -4,6 +4,8 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used by the ProtectedBranchesAPi to set up the * allowed_to_push, allowed_to_merge, and allowed_to_unprotect values. @@ -11,8 +13,22 @@ public class AllowedTo implements Serializable { private static final long serialVersionUID = 1L; + /** + * The access level associated with the user or group. + */ + @JsonProperty("access_level") private AccessLevel accessLevel; + + /** + * The ID of the user associated with the access. + */ + @JsonProperty("user_id") private Long userId; + + /** + * The ID of the group associated with the access. + */ + @JsonProperty("group_id") private Long groupId; public AllowedTo(AccessLevel accessLevel, Long userId, Long groupId) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java index 50abe3690..ef323f356 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java @@ -2,12 +2,33 @@ import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Application implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the application. + */ + @JsonProperty("id") private Long id; + + /** + * The application ID. + */ + @JsonProperty("application_id") private String applicationId; + + /** + * The name of the application. + */ + @JsonProperty("application_name") private String applicationName; + + /** + * The callback URL associated with the application. + */ + @JsonProperty("callback_url") private String callbackUrl; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java index 5f62a9cbd..8ae244334 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java @@ -10,7 +10,9 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; @@ -25,9 +27,32 @@ public class ApplicationSettings implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the application settings. + */ + @JsonProperty("id") private Long id; + + /** + * The date when the application settings were 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 application settings were 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 settings for the application stored as key-value pairs. + */ + @JsonProperty("settings") private Map settings = new HashMap<>(); public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java index f4635e96a..c5854a17f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java @@ -5,19 +5,75 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ApprovalRule implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the approval rule. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the approval rule. + */ + @JsonProperty("name") private String name; + + /** + * The type of the approval rule. + */ + @JsonProperty("rule_type") private String ruleType; + + /** + * The list of eligible approvers for the rule. + */ + @JsonProperty("eligible_approvers") private List eligibleApprovers; + + /** + * The number of approvals required for the rule. + */ + @JsonProperty("approvals_required") private Integer approvalsRequired; + + /** + * The source rule from which this approval rule is derived. + */ + @JsonProperty("source_rule") private ApprovalRule sourceRule; + + /** + * The list of users associated with the approval rule. + */ + @JsonProperty("users") private List users; + + /** + * The list of groups associated with the approval rule. + */ + @JsonProperty("groups") private List groups; + + /** + * Indicates whether the rule contains hidden groups. + */ + @JsonProperty("contains_hidden_groups") private Boolean containsHiddenGroups; + + /** + * The list of users who have approved the rule. + */ + @JsonProperty("approved_by") private List approvedBy; + + /** + * Indicates whether the rule has been approved. + */ + @JsonProperty("approved") private Boolean approved; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java index b52ef1a4e..55b32e764 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java @@ -5,17 +5,63 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ApprovalRuleParams implements Serializable { private static final long serialVersionUID = 1L; + /** + * The number of approvals required. + */ + @JsonProperty("approvals_required") private Integer approvalsRequired; + + /** + * The name of the approval rule. + */ + @JsonProperty("name") private String name; + + /** + * Indicates whether the rule applies to all protected branches. + */ + @JsonProperty("applies_to_all_protected_branches") private Boolean appliesToAllProtectedBranches; + + /** + * The list of group IDs associated with the approval rule. + */ + @JsonProperty("group_ids") private List groupIds; + + /** + * The list of protected branch IDs associated with the approval rule. + */ + @JsonProperty("protected_branch_ids") private List protectedBranchIds; + + /** + * The type of report generated by the approval rule. + */ + @JsonProperty("report_type") private String reportType; + + /** + * The type of rule (e.g., approval rule, merge request rule, etc.). + */ + @JsonProperty("rule_type") private String ruleType; + + /** + * The list of user IDs associated with the approval rule. + */ + @JsonProperty("user_ids") private List userIds; + + /** + * The list of usernames associated with the approval rule. + */ + @JsonProperty("usernames") private List usernames; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java index 3a8893afa..591bd0e98 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java @@ -5,10 +5,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ApprovalState implements Serializable { private static final long serialVersionUID = 1L; + /** + * Indicates whether the approval rules have been overwritten. + */ + @JsonProperty("approval_rules_overwritten") private Boolean approvalRulesOverwritten; + + /** + * The list of approval rules associated with the approval state. + */ + @JsonProperty("rules") private List rules; public Boolean getApprovalRulesOverwritten() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java index 0632e0e79..4d6e7ffbe 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java @@ -5,6 +5,7 @@ import org.gitlab4j.models.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; /** * This class is used by various models to represent the approved_by property, @@ -15,7 +16,16 @@ public class ApprovedBy implements Serializable { private static final long serialVersionUID = 1L; + /** + * The user associated with the approval. + */ + @JsonProperty("user") private User user; + + /** + * The group associated with the approval. + */ + @JsonProperty("group") private Group group; public User getUser() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java index bbdbf1eb4..d205cb2d2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Artifact implements Serializable { @@ -35,9 +36,28 @@ public String toString() { } } + /** + * The type of the file associated with the artifact. + */ + @JsonProperty("file_type") private FileType fileType; + + /** + * The size of the artifact. + */ + @JsonProperty("size") private Long size; + + /** + * The filename of the artifact. + */ + @JsonProperty("filename") private String filename; + + /** + * The format of the file associated with the artifact. + */ + @JsonProperty("file_format") private String fileFormat; public FileType getFileType() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java index 63c7df8b0..31ff0b950 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java @@ -4,10 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ArtifactsFile implements Serializable { private static final long serialVersionUID = 1L; + /** + * The filename of the artifact file. + */ + @JsonProperty("filename") private String filename; + + /** + * The size of the artifact file. + */ + @JsonProperty("size") private Long size; public String getFilename() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java index d4200dad7..85889e89e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java @@ -6,6 +6,8 @@ import org.gitlab4j.models.Constants.ArchiveFormat; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is part of the Release class model. */ @@ -15,7 +17,16 @@ public class Assets implements Serializable { public static class Source implements Serializable { private static final long serialVersionUID = 1L; + /** + * The format of the archive. + */ + @JsonProperty("format") private ArchiveFormat format; + + /** + * The URL of the source. + */ + @JsonProperty("url") private String url; public ArchiveFormat getFormat() { @@ -43,9 +54,28 @@ public String toString() { public static class Link implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the link. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the link. + */ + @JsonProperty("name") private String name; + + /** + * The URL associated with the link. + */ + @JsonProperty("url") private String url; + + /** + * Indicates if the link is external. + */ + @JsonProperty("external") private Boolean external; public Long getId() { @@ -86,9 +116,28 @@ public String toString() { } } + /** + * The count of assets. + */ + @JsonProperty("count") private Integer count; + + /** + * The list of sources associated with the assets. + */ + @JsonProperty("sources") private List sources; + + /** + * The list of links associated with the assets. + */ + @JsonProperty("links") private List links; + + /** + * The file path of the evidence associated with the assets. + */ + @JsonProperty("evidence_file_path") private String evidenceFilePath; public Integer getCount() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java index 001b19bd4..127c91c99 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java @@ -5,14 +5,48 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AuditEvent implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the audit event. + */ + @JsonProperty("id") private Long id; + + /** + * The ID of the author making the event. + */ + @JsonProperty("author_id") private Long authorId; + + /** + * The ID of the entity involved in the event. + */ + @JsonProperty("entity_id") private Long entityId; + + /** + * The type of the entity involved in the event. + */ + @JsonProperty("entity_type") private String entityType; + + /** + * The details associated with the audit event. + */ + @JsonProperty("details") private AuditEventDetail details; + + /** + * The creation date of the audit event. + * 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; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java index 327a4e717..40fb13905 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java @@ -4,19 +4,75 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AuditEventDetail implements Serializable { private static final long serialVersionUID = 1L; + /** + * The change associated with the audit event. + */ + @JsonProperty("change") private String change; + + /** + * The previous value of the change. + */ + @JsonProperty("from") private String from; + + /** + * The new value after the change. + */ + @JsonProperty("to") private String to; + + /** + * The added value in the audit event. + */ + @JsonProperty("add") private String add; + + /** + * The custom message associated with the audit event. + */ + @JsonProperty("custom_message") private String customMessage; + + /** + * The name of the author making the change. + */ + @JsonProperty("author_name") private String authorName; + + /** + * The ID of the target of the audit event. + */ + @JsonProperty("target_id") private Object targetId; + + /** + * The type of the target of the audit event. + */ + @JsonProperty("target_type") private String targetType; + + /** + * The details of the target of the audit event. + */ + @JsonProperty("target_details") private String targetDetails; + + /** + * The IP address associated with the audit event. + */ + @JsonProperty("ip_address") private String ipAddress; + + /** + * The path of the entity in the audit event. + */ + @JsonProperty("entity_path") private String entityPath; public String getCustomMessage() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java index 9293f5109..42fd639ff 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java @@ -7,6 +7,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class AwardEmoji implements Serializable { @@ -37,12 +39,50 @@ public String toString() { } } + /** + * The unique identifier of the award emoji. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the award emoji. + */ + @JsonProperty("name") private String name; + + /** + * The user associated with the award emoji. + */ + @JsonProperty("user") private User user; + + /** + * The date when the award emoji 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 award emoji 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 ID of the awardable entity. + */ + @JsonProperty("awardable_id") private Long awardableId; + + /** + * The type of the awardable entity. + */ + @JsonProperty("awardable_type") private AwardableType awardableType; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java index fff0edb0a..14361e5b9 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Badge implements Serializable { @@ -33,12 +34,46 @@ public String toString() { } } + /** + * The unique identifier of the badge. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the badge. + */ + @JsonProperty("name") private String name; + + /** + * The URL link associated with the badge. + */ + @JsonProperty("link_url") private String linkUrl; + + /** + * The image URL associated with the badge. + */ + @JsonProperty("image_url") private String imageUrl; + + /** + * The rendered URL link associated with the badge. + */ + @JsonProperty("rendered_link_url") private String renderedLinkUrl; + + /** + * The rendered image URL associated with the badge. + */ + @JsonProperty("rendered_image_url") private String renderedImageUrl; + + /** + * The kind of the badge (e.g., success, failure). + */ + @JsonProperty("kind") private BadgeKind kind; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java index a9b9b7ddb..e6addab37 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java @@ -5,10 +5,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Blame implements Serializable { private static final long serialVersionUID = 1L; + /** + * The commit associated with the blame. + */ + @JsonProperty("commit") private Commit commit; + + /** + * The list of lines associated with the blame. + */ + @JsonProperty("lines") private List lines; public Commit getCommit() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java index 802bd78eb..da848d2de 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java @@ -5,13 +5,39 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Board implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the board. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the board. + */ + @JsonProperty("name") private String name; + + /** + * The project associated with the board. + */ + @JsonProperty("project") private Project project; + + /** + * The milestone associated with the board. + */ + @JsonProperty("milestone") private Milestone milestone; + + /** + * The list of board lists associated with the board. + */ + @JsonProperty("lists") private List lists; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java index 5780d2c31..e6e6d7841 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class BoardList implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the board list. + */ + @JsonProperty("id") private Long id; + + /** + * The label associated with the board list. + */ + @JsonProperty("label") private Label label; + + /** + * The position of the board list. + */ + @JsonProperty("position") private Integer position; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java index 72e6db470..d0a97595c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java @@ -4,17 +4,63 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Branch implements Serializable { private static final long serialVersionUID = 1L; + /** + * The commit associated with the branch. + */ + @JsonProperty("commit") private Commit commit; + + /** + * Indicates whether developers can merge to this branch. + */ + @JsonProperty("developers_can_merge") private Boolean developersCanMerge; + + /** + * Indicates whether developers can push to this branch. + */ + @JsonProperty("developers_can_push") private Boolean developersCanPush; + + /** + * Indicates whether the branch is merged. + */ + @JsonProperty("merged") private Boolean merged; + + /** + * The name of the branch. + */ + @JsonProperty("name") private String name; + + /** + * Indicates whether the branch is protected. + */ + @JsonProperty("protected") private Boolean isProtected; + + /** + * Indicates whether the branch is the default branch. + */ + @JsonProperty("default") private Boolean isDefault; + + /** + * Indicates whether pushing is allowed on this branch. + */ + @JsonProperty("can_push") private Boolean canPush; + + /** + * The web URL associated with the branch. + */ + @JsonProperty("web_url") private String webUrl; public Commit getCommit() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java index 63554fcd3..1f78de4b2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java @@ -4,13 +4,39 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class BranchAccessLevel implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the branch access level. + */ + @JsonProperty("id") private Long id; + + /** + * The access level associated with the branch. + */ + @JsonProperty("access_level") private AccessLevel accessLevel; + + /** + * The description of the access level associated with the branch. + */ + @JsonProperty("access_level_description") private String accessLevelDescription; + + /** + * The user ID associated with the branch access level. + */ + @JsonProperty("user_id") private Long userId; + + /** + * The group ID associated with the branch access level. + */ + @JsonProperty("group_id") private Long groupId; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java index b7a4779ca..eba0432c5 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java @@ -5,27 +5,132 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Bridge implements Serializable { private static final long serialVersionUID = 1L; + /** + * The commit associated with the bridge. + */ + @JsonProperty("commit") private Commit commit; + + /** + * Indicates whether failure is allowed for the bridge. + */ + @JsonProperty("allow_failure") private boolean allowFailure; + + /** + * The creation date of the bridge. + * 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 start date of the bridge. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startedAt; + + /** + * The finish date of the bridge. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date finishedAt; + + /** + * The date the bridge was erased. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("erased_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date erasedAt; + + /** + * The duration of the bridge. + */ + @JsonProperty("duration") private Double duration; + + /** + * The queued duration of the bridge. + */ + @JsonProperty("queued_duration") private Double queuedDuration; + + /** + * The unique identifier of the bridge. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the bridge. + */ + @JsonProperty("name") private String name; + + /** + * The coverage associated with the bridge. + */ + @JsonProperty("coverage") private String coverage; + + /** + * The pipeline associated with the bridge. + */ + @JsonProperty("pipeline") private Pipeline pipeline; + + /** + * The reference associated with the bridge. + */ + @JsonProperty("ref") private String ref; + + /** + * The stage associated with the bridge. + */ + @JsonProperty("stage") private String stage; + + /** + * The status of the bridge. + */ + @JsonProperty("status") private String status; + + /** + * Indicates whether the bridge is a tag. + */ + @JsonProperty("tag") private boolean tag; + + /** + * The web URL associated with the bridge. + */ + @JsonProperty("web_url") private String webUrl; + + /** + * The user associated with the bridge. + */ + @JsonProperty("user") private User user; + + /** + * The downstream pipeline associated with the bridge. + */ + @JsonProperty("downstream_pipeline") private DownstreamPipeline downstreamPipeline; public Commit getCommit() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java index f9ce9cea9..b434f701c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java @@ -7,18 +7,61 @@ import org.gitlab4j.models.utils.ISO8601; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class ChangelogPayload implements Serializable { private static final long serialVersionUID = 1L; + /** + * The version associated with the changelog. + */ + @JsonProperty("version") private String version; + + /** + * The reference from which the changelog is generated. + */ + @JsonProperty("from") private String from; + + /** + * The reference to which the changelog is generated. + */ + @JsonProperty("to") private String to; + + /** + * The date associated with the changelog. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date date; + + /** + * The branch associated with the changelog. + */ + @JsonProperty("branch") private String branch; + + /** + * The trailer information associated with the changelog. + */ + @JsonProperty("trailer") private String trailer; + + /** + * The file associated with the changelog. + */ + @JsonProperty("file") private String file; + + /** + * The message associated with the changelog. + */ + @JsonProperty("message") private String message; public ChangelogPayload(String version) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java index 69f060cbd..e6f9fa7e2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java @@ -10,19 +10,54 @@ public class Changes implements Serializable { private static final long serialVersionUID = 1L; + /** + * The mode of file A in the change. + */ @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("a_mode") private String a_mode; + /** + * The mode of file B in the change. + */ @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("b_mode") private String b_mode; + /** + * Indicates if the file was deleted in the change. + */ + @JsonProperty("deleted_file") private Boolean deletedFile; + + /** + * The diff content of the file in the change. + */ + @JsonProperty("diff") private String diff; + + /** + * Indicates if the file is a new file in the change. + */ + @JsonProperty("new_file") private Boolean newFile; + + /** + * The new path of the file in the change. + */ + @JsonProperty("new_path") private String newPath; + + /** + * The old path of the file in the change. + */ + @JsonProperty("old_path") private String oldPath; + + /** + * Indicates if the file was renamed in the change. + */ + @JsonProperty("renamed_file") private Boolean renamedFile; @JsonInclude(JsonInclude.Include.ALWAYS) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java index 13f9fae81..1777ee5ea 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java @@ -6,14 +6,48 @@ import org.gitlab4j.models.Constants.LineType; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Comment implements Serializable { private static final long serialVersionUID = 1L; + /** + * The author of the comment. + */ + @JsonProperty("author") private Author author; + + /** + * The creation date of the comment. + * 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 type of the line (e.g., new or old). + */ + @JsonProperty("line_type") private LineType lineType; + + /** + * The path to the file being commented on. + */ + @JsonProperty("path") private String path; + + /** + * The line number of the comment. + */ + @JsonProperty("line") private Integer line; + + /** + * The content of the comment. + */ + @JsonProperty("note") private String note; public Author getAuthor() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java index b97e976b4..9507327e5 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java @@ -6,28 +6,138 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Commit implements Serializable { private static final long serialVersionUID = 1L; + /** + * The author of the commit. + */ + @JsonProperty("author") private Author author; + + /** + * The date when the commit was authored. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("authored_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date authoredDate; + + /** + * The email of the author. + */ + @JsonProperty("author_email") private String authorEmail; + + /** + * The name of the author. + */ + @JsonProperty("author_name") private String authorName; + + /** + * The date when the commit was committed. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("committed_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date committedDate; + + /** + * The email of the committer. + */ + @JsonProperty("committer_email") private String committerEmail; + + /** + * The name of the committer. + */ + @JsonProperty("committer_name") private String committerName; + + /** + * The creation date of the commit. + * 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 unique identifier of the commit. + */ + @JsonProperty("id") private String id; + + /** + * The commit message. + */ + @JsonProperty("message") private String message; + + /** + * The list of parent commit IDs. + */ + @JsonProperty("parent_ids") private List parentIds; + + /** + * The shortened commit ID. + */ + @JsonProperty("short_id") private String shortId; + + /** + * The statistics associated with the commit. + */ + @JsonProperty("stats") private CommitStats stats; + + /** + * The status of the commit. + */ + @JsonProperty("status") private String status; + + /** + * The timestamp of the commit. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("timestamp") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date timestamp; + + /** + * The title of the commit. + */ + @JsonProperty("title") private String title; + + /** + * The URL of the commit. + */ + @JsonProperty("url") private String url; + + /** + * The web URL of the commit. + */ + @JsonProperty("web_url") private String webUrl; + + /** + * The project ID associated with the commit. + */ + @JsonProperty("project_id") private Long projectId; + + /** + * The pipeline associated with the commit. + */ + @JsonProperty("last_pipeline") private Pipeline lastPipeline; public Author getAuthor() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java index 20c8c8822..48a20a64b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java @@ -10,6 +10,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class CommitAction implements Serializable { @@ -40,12 +41,46 @@ public String toString() { } } + /** + * The action associated with the commit (e.g., add, modify, delete). + */ + @JsonProperty("action") private Action action; + + /** + * The file path associated with the commit action. + */ + @JsonProperty("file_path") private String filePath; + + /** + * The previous file path before the commit action. + */ + @JsonProperty("previous_path") private String previousPath; + + /** + * The content of the file associated with the commit action. + */ + @JsonProperty("content") private String content; + + /** + * The encoding of the file associated with the commit action. + */ + @JsonProperty("encoding") private Encoding encoding; + + /** + * The last commit ID associated with the commit action. + */ + @JsonProperty("last_commit_id") private String lastCommitId; + + /** + * Indicates if the file mode should be executed in the commit action. + */ + @JsonProperty("execute_filemode") private Boolean executeFilemode; public Action getAction() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java index 07e0bc283..ea7b6ecf8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java @@ -6,18 +6,69 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CommitPayload implements Serializable { private static final long serialVersionUID = 1L; + /** + * The name of the branch for the commit. + */ + @JsonProperty("branch") private String branch; + + /** + * The commit message. + */ + @JsonProperty("commit_message") private String commitMessage; + + /** + * The starting branch for the commit. + */ + @JsonProperty("start_branch") private String startBranch; + + /** + * The starting SHA for the commit. + */ + @JsonProperty("start_sha") private String startSha; + + /** + * The starting project associated with the commit. + */ + @JsonProperty("start_project") private Object startProject; + + /** + * The list of commit actions associated with the commit. + */ + @JsonProperty("actions") private List actions; + + /** + * The email of the commit author. + */ + @JsonProperty("author_email") private String authorEmail; + + /** + * The name of the commit author. + */ + @JsonProperty("author_name") private String authorName; + + /** + * Indicates whether stats are included in the commit. + */ + @JsonProperty("stats") private Boolean stats; + + /** + * Indicates whether the commit is forced. + */ + @JsonProperty("force") private Boolean force; public String getBranch() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java index dbc25c5a9..6ed5ebb18 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java @@ -6,12 +6,22 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class CommitRef implements Serializable { private static final long serialVersionUID = 1L; + /** + * The type of the reference (e.g., branch, tag). + */ + @JsonProperty("type") private RefType type; + + /** + * The name of the reference (e.g., branch name, tag name). + */ + @JsonProperty("name") private String name; public enum RefType { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java index 1c15bba32..f7b3905e0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CommitStats implements Serializable { private static final long serialVersionUID = 1L; + /** + * The number of additions in the commit. + */ + @JsonProperty("additions") private Integer additions; + + /** + * The number of deletions in the commit. + */ + @JsonProperty("deletions") private Integer deletions; + + /** + * The total number of changes in the commit (additions + deletions). + */ + @JsonProperty("total") private Integer total; public Integer getAdditions() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java index 544e6e6d4..be5d1bd2a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java @@ -5,22 +5,100 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CommitStatus implements Serializable { private static final long serialVersionUID = 1L; + /** + * Indicates if failure is allowed for this commit status. + */ + @JsonProperty("allow_failure") private Boolean allowFailure; + + /** + * The author of the commit status. + */ + @JsonProperty("author") private Author author; + + /** + * The coverage percentage associated with the commit status. + */ + @JsonProperty("coverage") private Float coverage; + + /** + * The creation date of the commit status. + * 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 description of the commit status. + */ + @JsonProperty("description") private String description; + + /** + * The date the commit status was finished. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date finishedAt; + + /** + * The unique identifier of the commit status. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the commit status. + */ + @JsonProperty("name") private String name; + + /** + * The pipeline ID associated with the commit status. + */ + @JsonProperty("pipeline_id") private Long pipelineId; + + /** + * The reference of the commit status (e.g., branch name). + */ + @JsonProperty("ref") private String ref; + + /** + * The SHA associated with the commit status. + */ + @JsonProperty("sha") private String sha; + + /** + * The date the commit status was started. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startedAt; + + /** + * The status of the commit (e.g., success, failed). + */ + @JsonProperty("status") private String status; + + /** + * The target URL associated with the commit status. + */ + @JsonProperty("target_url") private String targetUrl; public Boolean isAllowFailure() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java index 190fb688f..222dc5b12 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.GitLabForm; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; /** * This class is used to filter commit status when getting lists of them. @@ -13,9 +14,28 @@ public class CommitStatusFilter implements Serializable { private static final long serialVersionUID = 1L; + /** + * The reference associated with the commit status filter. + */ + @JsonProperty("ref") private String ref; + + /** + * The stage associated with the commit status filter. + */ + @JsonProperty("stage") private String stage; + + /** + * The name associated with the commit status filter. + */ + @JsonProperty("name") private String name; + + /** + * Indicates whether all commit statuses are included in the filter. + */ + @JsonProperty("all") private Boolean all; public CommitStatusFilter withRef(String ref) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java index 139106375..4351de73e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java @@ -5,14 +5,39 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CompareResults implements Serializable { private static final long serialVersionUID = 1L; + /** + * The commit associated with the comparison. + */ + @JsonProperty("commit") private Commit commit; + + /** + * The list of commits associated with the comparison. + */ + @JsonProperty("commits") private List commits; - ; + + /** + * The list of diffs associated with the comparison. + */ + @JsonProperty("diffs") private List diffs; + + /** + * Indicates if the comparison timed out. + */ + @JsonProperty("compare_timeout") private Boolean compareTimeout; + + /** + * Indicates if the comparison was done on the same ref. + */ + @JsonProperty("compare_same_ref") private Boolean compareSameRef; public Commit getCommit() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java index 959ab3a24..23ca9be6b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java @@ -1,5 +1,7 @@ package org.gitlab4j.api.models; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class models the object for a repository contributor. * See Contributors at GitLab. @@ -7,8 +9,22 @@ public class Contributor extends AbstractUser { private static final long serialVersionUID = 1L; + /** + * The number of commits by the contributor. + */ + @JsonProperty("commits") private Integer commits; + + /** + * The number of additions made by the contributor. + */ + @JsonProperty("additions") private Integer additions; + + /** + * The number of deletions made by the contributor. + */ + @JsonProperty("deletions") private Integer deletions; public Integer getCommits() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java index fd4ebba81..10dc6fb7a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java @@ -2,12 +2,33 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CreatedChildEpic extends AbstractMinimalEpic { private static final long serialVersionUID = 1L; + /** + * Indicates if the child epic has children. + */ + @JsonProperty("has_children") private Boolean hasChildren; + + /** + * Indicates if the child epic has issues. + */ + @JsonProperty("has_issues") private Boolean hasIssues; + + /** + * The URL associated with the child epic. + */ + @JsonProperty("url") private String url; + + /** + * The relation URL associated with the child epic. + */ + @JsonProperty("relation_url") private String relationUrl; public Boolean getHasChildren() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java index ec02bd541..0a9ec1ccc 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java @@ -2,10 +2,21 @@ import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CustomAttribute implements Serializable { private static final long serialVersionUID = 1L; + /** + * The key associated with the custom attribute. + */ + @JsonProperty("key") private String key; + + /** + * The value associated with the custom attribute. + */ + @JsonProperty("value") private String value; public String getKey() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java index 5994075f5..9f93703ec 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java @@ -5,13 +5,42 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class DeployKey implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the deploy key. + */ + @JsonProperty("id") private Long id; + + /** + * The title of the deploy key. + */ + @JsonProperty("title") private String title; + + /** + * The actual deploy key. + */ + @JsonProperty("key") private String key; + + /** + * Indicates whether the deploy key has push permissions. + */ + @JsonProperty("can_push") private Boolean canPush; + + /** + * The creation date of the deploy key. + * 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; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java index 61b7e38b3..e22aee752 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java @@ -7,14 +7,48 @@ import org.gitlab4j.models.Constants; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class DeployToken implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the deploy token. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the deploy token. + */ + @JsonProperty("name") private String name; + + /** + * The username associated with the deploy token. + */ + @JsonProperty("username") private String username; + + /** + * The expiration date of the deploy token. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + /** + * The list of scopes associated with the deploy token. + */ + @JsonProperty("scopes") private List scopes; + + /** + * The token string. + */ + @JsonProperty("token") private String token; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java index 43358b9c2..6d840605f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java @@ -7,26 +7,126 @@ import org.gitlab4j.models.Constants.DeploymentStatus; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Deployable implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the deployable. + */ + @JsonProperty("id") private Long id; + + /** + * The status of the deployable. + */ + @JsonProperty("status") private DeploymentStatus status; + + /** + * The stage of the deployable. + */ + @JsonProperty("stage") private String stage; + + /** + * The name of the deployable. + */ + @JsonProperty("name") private String name; + + /** + * The reference associated with the deployable. + */ + @JsonProperty("ref") private String ref; + + /** + * Indicates if the deployable is a tag. + */ + @JsonProperty("tag") private Boolean tag; + + /** + * The coverage of the deployable. + */ + @JsonProperty("coverage") private Float coverage; + + /** + * The creation date of the deployable. + * 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 the deployable was started. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startedAt; + + /** + * The date the deployable was finished. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date finishedAt; + + /** + * The duration of the deployable process. + */ + @JsonProperty("duration") private Double duration; + + /** + * The user associated with the deployable. + */ + @JsonProperty("user") private User user; + + /** + * The commit associated with the deployable. + */ + @JsonProperty("commit") private Commit commit; + + /** + * The pipeline associated with the deployable. + */ + @JsonProperty("pipeline") private Pipeline pipeline; + + /** + * The web URL associated with the deployable. + */ + @JsonProperty("web_url") private String webUrl; + + /** + * The list of artifacts associated with the deployable. + */ + @JsonProperty("artifacts") private List artifacts; + + /** + * The runner associated with the deployable. + */ + @JsonProperty("runner") private Runner runner; + + /** + * The expiration date of the artifacts. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("artifacts_expire_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date artifactsExpireAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java index dd37155b6..34561f15a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java @@ -6,18 +6,74 @@ import org.gitlab4j.models.Constants.DeploymentStatus; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Deployment implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the deployment. + */ + @JsonProperty("id") private Long id; + + /** + * The internal identifier of the deployment. + */ + @JsonProperty("iid") private Long iid; + + /** + * The reference associated with the deployment (e.g., branch or tag). + */ + @JsonProperty("ref") private String ref; + + /** + * The SHA associated with the deployment. + */ + @JsonProperty("sha") private String sha; + + /** + * The creation date of the deployment. + * 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 last updated date of the deployment. + * 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 status of the deployment (e.g., success, failed). + */ + @JsonProperty("status") private DeploymentStatus status; + + /** + * The user associated with the deployment. + */ + @JsonProperty("user") private User user; + + /** + * The environment associated with the deployment. + */ + @JsonProperty("environment") private Environment environment; + + /** + * The deployable associated with the deployment. + */ + @JsonProperty("deployable") private Deployable deployable; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java index 7989e9128..18cb7dddd 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java @@ -10,39 +10,49 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.ISO8601; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class DeploymentFilter implements Serializable { private static final long serialVersionUID = 1L; /** - * Return deployments ordered by either one of id, iid, created_at, updated_at or ref fields. Default is id. + * Return deployments ordered by either one of id, iid, created_at, updated_at, or ref fields. Default is id. */ + @JsonProperty("order_by") private DeploymentOrderBy orderBy; /** * Return deployments sorted in asc or desc order. Default is asc. */ + @JsonProperty("sort_order") private SortOrder sortOrder; /** * Return deployments updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; /** * Return deployments updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; /** * The name of the environment to filter deployments by. */ + @JsonProperty("environment") private String environment; /** * The status to filter deployments by. */ + @JsonProperty("status") private DeploymentStatus status; public DeploymentOrderBy getOrderBy() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java index ffa57f468..600401253 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java @@ -4,20 +4,66 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is part of the Pipeline message. */ public class DetailedStatus implements Serializable { private static final long serialVersionUID = 1L; + /** + * The icon associated with the detailed status. + */ + @JsonProperty("icon") private String icon; + + /** + * The text description of the detailed status. + */ + @JsonProperty("text") private String text; + + /** + * The label associated with the detailed status. + */ + @JsonProperty("label") private String label; + + /** + * The group associated with the detailed status. + */ + @JsonProperty("group") private String group; + + /** + * The tooltip description of the detailed status. + */ + @JsonProperty("tooltip") private String tooltip; + + /** + * Indicates if the detailed status has additional details. + */ + @JsonProperty("has_details") private Boolean hasDetails; + + /** + * The path to the additional details. + */ + @JsonProperty("details_path") private String detailsPath; + + /** + * The illustration associated with the detailed status. + */ + @JsonProperty("illustration") private String illustration; + + /** + * The favicon associated with the detailed status. + */ + @JsonProperty("favicon") private String favicon; public String getIcon() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java index 48285ebf0..a7343b6f7 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java @@ -10,19 +10,54 @@ public class Diff implements Serializable { private static final long serialVersionUID = 1L; + /** + * The mode of file A in the diff. + */ @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("a_mode") private String a_mode; + /** + * The mode of file B in the diff. + */ @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("b_mode") private String b_mode; + /** + * Indicates if the file was deleted. + */ + @JsonProperty("deleted_file") private Boolean deletedFile; + + /** + * The diff content of the file. + */ + @JsonProperty("diff") private String diff; + + /** + * Indicates if the file is a new file. + */ + @JsonProperty("new_file") private Boolean newFile; + + /** + * The new path of the file. + */ + @JsonProperty("new_path") private String newPath; + + /** + * The old path of the file. + */ + @JsonProperty("old_path") private String oldPath; + + /** + * Indicates if the file was renamed. + */ + @JsonProperty("renamed_file") private Boolean renamedFile; @JsonInclude(JsonInclude.Include.ALWAYS) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java index 1b5b9052c..f28e76ea4 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class DiffRef implements Serializable { private static final long serialVersionUID = 1L; + /** + * The base SHA for the diff reference. + */ + @JsonProperty("base_sha") private String baseSha; + + /** + * The head SHA for the diff reference. + */ + @JsonProperty("head_sha") private String headSha; + + /** + * The start SHA for the diff reference. + */ + @JsonProperty("start_sha") private String startSha; public DiffRef() {} diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java index 748982e3f..9b2b67c54 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java @@ -5,11 +5,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Discussion implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the discussion. + */ + @JsonProperty("id") private String id; + + /** + * Indicates if the discussion is an individual note. + */ + @JsonProperty("individual_note") private Boolean individualNote; + + /** + * The list of notes associated with the discussion. + */ + @JsonProperty("notes") private List notes; public String getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java index 466118ffd..9c425b38a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java @@ -5,15 +5,56 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class DownstreamPipeline implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the downstream pipeline. + */ + @JsonProperty("id") private Long id; + + /** + * The SHA of the downstream pipeline. + */ + @JsonProperty("sha") private String sha; + + /** + * The reference for the downstream pipeline (e.g., branch name). + */ + @JsonProperty("ref") private String ref; + + /** + * The status of the downstream pipeline. + */ + @JsonProperty("status") private String status; + + /** + * The creation date of the downstream pipeline. + * 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 last updated date of the downstream pipeline. + * 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 web URL of the downstream pipeline. + */ + @JsonProperty("web_url") private String webUrl; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java index f720b2889..db2e7b7c2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java @@ -5,6 +5,7 @@ import org.gitlab4j.models.utils.DurationUtils; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; /** @@ -13,7 +14,16 @@ public class Duration implements Serializable { private static final long serialVersionUID = 1L; + /** + * The duration in seconds. + */ + @JsonProperty("seconds") private int seconds; + + /** + * The string representation of the duration. + */ + @JsonProperty("duration_string") private String durationString; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java index 817a79b78..3cb1e3102 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java @@ -2,10 +2,21 @@ import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Email implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the email. + */ + @JsonProperty("id") private Long id; + + /** + * The email address. + */ + @JsonProperty("email") private String email; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java index b630a1a51..a329c246f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java @@ -7,6 +7,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Environment implements Serializable { @@ -35,13 +37,54 @@ public String toString() { } } + /** + * The unique identifier for the environment. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the environment. + */ + @JsonProperty("name") private String name; + + /** + * The slug of the environment. + */ + @JsonProperty("slug") private String slug; + + /** + * The external URL of the environment. + */ + @JsonProperty("external_url") private String externalUrl; + + /** + * The tier of the environment (e.g., production, staging). + */ + @JsonProperty("tier") private String tier; + + /** + * The state of the environment (e.g., active, inactive). + */ + @JsonProperty("state") private EnvironmentState state; + + /** + * The last deployment associated with the environment. + */ + @JsonProperty("last_deployment") private Deployment lastDeployment; + + /** + * The auto stop time for the environment, if any. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("auto_stop_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date autoStopAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java index e73530d73..e2ba9bfbd 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java @@ -4,12 +4,36 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Epic extends AbstractEpic { private static final long serialVersionUID = 1L; + /** + * Indicates if the start date of the epic is fixed. + */ + @JsonProperty("start_date_is_fixed") private Boolean startDateIsFixed; + + /** + * Indicates if the due date of the epic is fixed. + */ + @JsonProperty("due_date_is_fixed") private Boolean dueDateIsFixed; + + /** + * The due date inherited from a source, if applicable. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("due_date_from_inherited_source") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date dueDateFromInheritedSource; + + /** + * Indicates if the epic is subscribed. + */ + @JsonProperty("subscribed") private Boolean subscribed; public Boolean getStartDateIsFixed() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java index db191dcb6..15af6edb0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java @@ -13,6 +13,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; /** @@ -21,19 +23,94 @@ public class EpicFilter implements Serializable { private static final long serialVersionUID = 1L; + /** + * The author ID for filtering epic issues. + */ + @JsonProperty("author_id") private Long authorId; + + /** + * The username of the author for filtering epic issues. + */ + @JsonProperty("author_username") private String authorUsername; + + /** + * The labels associated with epic issues. + */ + @JsonProperty("labels") private String labels; + + /** + * The ordering criteria for the epics. + */ + @JsonProperty("order_by") private EpicOrderBy orderBy; + + /** + * The sorting order for the epics. + */ + @JsonProperty("sort") private SortOrder sort; + + /** + * The search string to filter epics. + */ + @JsonProperty("search") private String search; + + /** + * The state of the epic. + */ + @JsonProperty("state") private EpicState state; + + /** + * The date after which the epic was created. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("created_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAfter; + + /** + * The date after which the epic was updated. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; + + /** + * The date before which the epic was updated. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; + + /** + * Indicates if ancestor groups should be included in the filter. + */ + @JsonProperty("include_ancestor_groups") private Boolean includeAncestorGroups; + + /** + * Indicates if descendant groups should be included in the filter. + */ + @JsonProperty("include_descendant_groups") private Boolean includeDescendantGroups; + + /** + * The emoji reaction by the authenticated user to filter epics. + */ + @JsonProperty("my_reaction_emoji") private String myReactionEmoji; + + /** + * A map of epic fields and values to exclude from the filter. + */ + @JsonProperty("not") private Map not; public enum EpicField { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java index d485c6069..4d8db48f2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java @@ -9,10 +9,22 @@ public class EpicIssue extends AbstractIssue { + /** + * The links associated with the epic issue. + */ @JsonProperty("_links") private Map links; + /** + * The unique identifier of the epic issue. + */ + @JsonProperty("epic_issue_id") private Long epicIssueId; + + /** + * The relative position of the epic issue in relation to other issues. + */ + @JsonProperty("relative_position") private Integer relativePosition; public Map getLinks() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java index 92df1bae6..87e68dcc6 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java @@ -4,12 +4,33 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EpicIssueLink implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the epic issue link. + */ + @JsonProperty("id") private Long id; + + /** + * The relative position of the issue in relation to the epic. + */ + @JsonProperty("relative_position") private Integer relativePosition; + + /** + * The epic associated with the issue. + */ + @JsonProperty("epic") private Epic epic; + + /** + * The issue associated with the epic. + */ + @JsonProperty("issue") private Issue issue; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java index 928fa83d5..72107ba84 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java @@ -6,24 +6,102 @@ import org.gitlab4j.models.Constants.TargetType; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Event implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the event. + */ + @JsonProperty("id") private Long id; + + /** + * The name of the action that triggered the event. + */ + @JsonProperty("action_name") private String actionName; + + /** + * The author associated with the event. + */ + @JsonProperty("author") private Author author; + + /** + * The ID of the author associated with the event. + */ + @JsonProperty("author_id") private Long authorId; + + /** + * The username of the author associated with the event. + */ + @JsonProperty("author_username") private String authorUsername; + + /** + * The event data associated with the event. + */ + @JsonProperty("data") private EventData data; + + /** + * The ID of the project associated with the event. + */ + @JsonProperty("project_id") private Long projectId; + + /** + * The target ID associated with the event. + */ + @JsonProperty("target_id") private Long targetId; + + /** + * The target IID associated with the event. + */ + @JsonProperty("target_iid") private Long targetIid; + + /** + * The target title associated with the event. + */ + @JsonProperty("target_title") private String targetTitle; + + /** + * The target type associated with the event. + */ + @JsonProperty("target_type") private TargetType targetType; + + /** + * The title of the event. + */ + @JsonProperty("title") private String title; + + /** + * The creation date of the event. + * 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 note associated with the event. + */ + @JsonProperty("note") private Note note; + + /** + * The push data associated with the event. + */ + @JsonProperty("push_data") private PushData pushData; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java index 856203e90..6c92002c3 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java @@ -5,16 +5,57 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class EventData implements Serializable { private static final long serialVersionUID = 1L; + /** + * The state of the data after the event. + */ + @JsonProperty("after") private String after; + + /** + * The state of the data before the event. + */ + @JsonProperty("before") private String before; + + /** + * The list of commits associated with the event. + */ + @JsonProperty("commits") private List commits; + + /** + * The reference for the event (e.g., a branch or tag). + */ + @JsonProperty("ref") private String ref; + + /** + * The repository related to the event. + */ + @JsonProperty("repository") private Repository repository; + + /** + * The total number of commits involved in the event. + */ + @JsonProperty("total_commits_count") private Integer totalCommitsCount; + + /** + * The user ID associated with the event. + */ + @JsonProperty("user_id") private Long userId; + + /** + * The user name associated with the event. + */ + @JsonProperty("user_name") private String userName; public String getAfter() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java index 6375d29bf..22fac35d0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java @@ -4,9 +4,12 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Exists implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("exists") private Boolean exists; public Boolean getExists() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java index 42f2c29e9..11b468671 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java @@ -7,10 +7,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 ExportStatus implements Serializable { private static final long serialVersionUID = 1L; @@ -48,15 +45,59 @@ public String toString() { } } + /** + * The unique identifier of the export status. + */ + @JsonProperty("id") private Long id; + + /** + * The description of the export status. + */ + @JsonProperty("description") private String description; + + /** + * The name of the export status. + */ + @JsonProperty("name") private String name; + + /** + * The name of the export status with the namespace. + */ + @JsonProperty("name_with_namespace") private String nameWithNamespace; + + /** + * The path of the export status. + */ + @JsonProperty("path") private String path; + + /** + * The path of the export status with the namespace. + */ + @JsonProperty("path_with_namespace") private String pathWithNamespace; + + /** + * The creation date of the export status. + * 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 export status (e.g., in progress, completed, etc.). + */ + @JsonProperty("export_status") private Status exportStatus; + /** + * The links related to the export status. + */ @JsonProperty("_links") private Map links; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java index 10001419f..83daba085 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java @@ -5,13 +5,39 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ExternalStatusCheck implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the external status check details. + */ + @JsonProperty("id") private Long id; + + /** + * The name associated with the external status check details. + */ + @JsonProperty("name") private String name; + + /** + * The project ID associated with the external status check. + */ + @JsonProperty("project_id") private Long projectId; + + /** + * The external URL associated with the status check. + */ + @JsonProperty("external_url") private String externalUrl; + + /** + * The list of protected branches associated with the external status check. + */ + @JsonProperty("protected_branches") private List protectedBranches; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java index 295df08e5..aaa2c104e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java @@ -5,14 +5,50 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ExternalStatusCheckProtectedBranch implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the external status check protected branch. + */ + @JsonProperty("id") private Long id; + + /** + * The project ID associated with the external status check. + */ + @JsonProperty("project_id") private Long projectId; + + /** + * The name of the external status check protected branch. + */ + @JsonProperty("name") private String name; + + /** + * The creation date of the external status check protected branch. + * 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 last updated date of the external status check protected branch. + * 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; + + /** + * Indicates if code owner approval is required for the external status check protected branch. + */ + @JsonProperty("code_owner_approval_required") private Boolean codeOwnerApprovalRequired; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java index 1755f6dc5..b6741765c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ExternalStatusCheckResult implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the status. + */ + @JsonProperty("id") private Long id; + + /** + * The merge request associated with the status. + */ + @JsonProperty("merge_request") private MergeRequest mergeRequest; + + /** + * The external status check. + */ + @JsonProperty("external_status_check") private ExternalStatusCheck externalStatusCheck; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java index 8f0a5de72..269f060cb 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java @@ -6,14 +6,34 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class ExternalStatusCheckStatus implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier for the status check. + */ + @JsonProperty("id") private Long id; + + /** + * The name associated with the status check. + */ + @JsonProperty("name") private String name; + + /** + * The external URL associated with the status check. + */ + @JsonProperty("external_url") private String externalUrl; + + /** + * The status of the external status check. + */ + @JsonProperty("status") private Status status; public enum Status { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java index 00439ab4d..90871b103 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class FileUpload implements Serializable { private static final long serialVersionUID = 1L; + /** + * The alternate text for the file. + */ + @JsonProperty("alt") private String alt; + + /** + * The URL of the uploaded file. + */ + @JsonProperty("url") private String url; + + /** + * The markdown representation of the file. + */ + @JsonProperty("markdown") private String markdown; public String getAlt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java index ace61c81f..678a89da1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java @@ -4,10 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GitLabCiTemplate implements Serializable { private static final long serialVersionUID = 1L; + /** + * The name associated with the content. + */ + @JsonProperty("name") private String name; + + /** + * The content of the object. + */ + @JsonProperty("content") private String content; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java index 072917921..51db0ab75 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java @@ -4,10 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GitLabCiTemplateElement implements Serializable { private static final long serialVersionUID = 1L; + /** + * The key string associated with the key details. + */ + @JsonProperty("key") private String key; + + /** + * The name associated with the key details. + */ + @JsonProperty("name") private String name; public String getKey() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java index b1025dd07..fa4f167a9 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java @@ -2,10 +2,29 @@ import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GpgKey { + /** + * The unique identifier for the key. + */ + @JsonProperty("id") private Long id; + + /** + * The key string associated with the key details. + */ + @JsonProperty("key") private String key; + + /** + * The creation date of the key. + * 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; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java index acbb887e8..680b0271f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java @@ -4,14 +4,45 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GpgSignature implements Serializable { private static final long serialVersionUID = 1L; + /** + * The ID of the GPG key. + */ + @JsonProperty("gpg_key_id") private Long gpgKeyId; + + /** + * The primary key ID of the GPG key. + */ + @JsonProperty("gpg_key_primary_keyid") private String gpgKeyPrimaryKeyid; + + /** + * The username associated with the GPG key. + */ + @JsonProperty("gpg_key_user_name") private String gpgKeyUserName; + + /** + * The email address associated with the GPG key. + */ + @JsonProperty("gpg_key_user_email") private String gpgKeyUserEmail; + + /** + * The verification status of the GPG key. + */ + @JsonProperty("verification_status") private String verificationStatus; + + /** + * The subkey ID of the GPG key. + */ + @JsonProperty("gpg_key_subkey_id") private String gpgKeySubkeyId; public Long getGpgKeyId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java index bfec0db61..cec22aa5f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java @@ -8,15 +8,36 @@ import org.gitlab4j.models.Constants.SubgroupCreationLevel; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class Group extends AbstractGroup { private static final long serialVersionUID = 1L; public class Statistics { + + /** + * The total storage size used by the project. + */ + @JsonProperty("storage_size") private Long storageSize; + + /** + * The repository size for the project. + */ + @JsonProperty("repository_size") private Long repositorySize; + + /** + * The size used by LFS (Large File Storage) objects. + */ + @JsonProperty("lfs_objects_size") private Long lfsObjectsSize; + + /** + * The size of job artifacts associated with the project. + */ + @JsonProperty("job_artifacts_size") private Long jobArtifactsSize; public Long getStorageSize() { @@ -52,26 +73,126 @@ public void setJobArtifactsSize(Long jobArtifactsSize) { } } + /** + * The path of the project. + */ + @JsonProperty("path") private String path; + + /** + * The description of the project. + */ + @JsonProperty("description") private String description; + + /** + * The visibility of the project. + */ + @JsonProperty("visibility") private Visibility visibility; + + /** + * Indicates if LFS (Large File Storage) is enabled for the project. + */ + @JsonProperty("lfs_enabled") private Boolean lfsEnabled; + + /** + * Indicates if request access is enabled for the project. + */ + @JsonProperty("request_access_enabled") private Boolean requestAccessEnabled; + + /** + * The parent project ID, if any. + */ + @JsonProperty("parent_id") private Long parentId; + + /** + * The shared runners minutes limit for the project. + */ + @JsonProperty("shared_runners_minutes_limit") private Integer sharedRunnersMinutesLimit; + + /** + * The statistics related to the project. + */ + @JsonProperty("statistics") private Statistics statistics; + + /** + * The list of projects associated with the current project. + */ + @JsonProperty("projects") private List projects; + + /** + * The list of shared projects. + */ + @JsonProperty("shared_projects") private List sharedProjects; + + /** + * The creation date of the project. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("created_at") private Date createdAt; + + /** + * The groups with which the project is shared. + */ + @JsonProperty("shared_with_groups") private List sharedWithGroups; + + /** + * The custom attributes for the project. + */ + @JsonProperty("custom_attributes") private List customAttributes; + + /** + * The runners token for the project. + */ + @JsonProperty("runners_token") private String runnersToken; + + /** + * Indicates if sharing groups outside the hierarchy is prevented. + */ + @JsonProperty("prevent_sharing_groups_outside_hierarchy") private Boolean preventSharingGroupsOutsideHierarchy; + + /** + * Indicates if forking outside the group is prevented. + */ + @JsonProperty("prevent_forking_outside_group") private Boolean preventForkingOutsideGroup; + + /** + * The project creation level for the project. + */ + @JsonProperty("project_creation_level") private ProjectCreationLevel projectCreationLevel; + + /** + * The subgroup creation level for the project. + */ + @JsonProperty("subgroup_creation_level") private SubgroupCreationLevel subgroupCreationLevel; + + /** + * The default branch protection level for the project. + */ + @JsonProperty("default_branch_protection") private DefaultBranchProtectionLevel defaultBranchProtection; + /** + * The date when the project is marked for deletion. + * Expected in the format (yyyy-MM-dd). + */ + @JsonProperty("marked_for_deletion_on") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date markedForDeletionOn; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java index b7806911d..5b805707c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java @@ -2,9 +2,12 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GroupAccessToken extends ImpersonationToken { private static final long serialVersionUID = 1L; + @JsonProperty("access_level") private AccessLevel accessLevel; public AccessLevel getAccessLevel() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java index 9e1654554..c63115527 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java @@ -9,22 +9,78 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used to filter Groups when getting lists of groups. */ public class GroupFilter implements Serializable { private static final long serialVersionUID = 1L; + /** + * List of group IDs to skip in the filter. + */ + @JsonProperty("skip_groups") private List skipGroups; + + /** + * Indicates if all available groups should be included in the filter. + */ + @JsonProperty("all_available") private Boolean allAvailable; + + /** + * A search string to filter groups by. + */ + @JsonProperty("search") private String search; + + /** + * The ordering criteria for the groups. + */ + @JsonProperty("order_by") private GroupOrderBy orderBy; + + /** + * The sorting order for the groups. + */ + @JsonProperty("sort") private SortOrder sort; + + /** + * Indicates if statistics should be included for the groups. + */ + @JsonProperty("statistics") private Boolean statistics; + + /** + * Indicates if custom attributes should be included in the filter. + */ + @JsonProperty("with_custom_attributes") private Boolean withCustomAttributes; + + /** + * Indicates if the current user owns the groups. + */ + @JsonProperty("owned") private Boolean owned; + + /** + * The access level required for the groups. + */ + @JsonProperty("access_level") private AccessLevel accessLevel; + + /** + * Indicates if only top-level groups should be included in the filter. + */ + @JsonProperty("top_level_only") private Boolean topLevelOnly; + + /** + * A list of custom attributes to filter by. + */ + @JsonProperty("custom_attributes_filter") private List customAttributesFilter = new ArrayList<>(); /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java index 6182861a6..de3d34603 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java @@ -3,37 +3,186 @@ import java.io.Serializable; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GroupHook implements Serializable { private static final long serialVersionUID = 1L; + /** + * The unique identifier of the webhook. + */ + @JsonProperty("id") private Long id; + + /** + * The URL of the webhook. + */ + @JsonProperty("url") private String url; + + /** + * The name of the webhook. + */ + @JsonProperty("name") private String name; + + /** + * The description of the webhook. + */ + @JsonProperty("description") private String description; + + /** + * The group ID associated with the webhook. + */ + @JsonProperty("group_id") private Long groupId; + + /** + * Indicates if push events should be sent. + */ + @JsonProperty("push_events") private Boolean pushEvents; + + /** + * The branch filter for push events. + */ + @JsonProperty("push_events_branch_filter") private String pushEventsBranchFilter; + + /** + * The strategy for filtering branches. + */ + @JsonProperty("branch_filter_strategy") private String branchFilterStrategy; + + /** + * Indicates if issue events should be sent. + */ + @JsonProperty("issues_events") private Boolean issuesEvents; + + /** + * Indicates if confidential issues events should be sent. + */ + @JsonProperty("confidential_issues_events") private Boolean confidentialIssuesEvents; + + /** + * Indicates if merge request events should be sent. + */ + @JsonProperty("merge_requests_events") private Boolean mergeRequestsEvents; + + /** + * Indicates if tag push events should be sent. + */ + @JsonProperty("tag_push_events") private Boolean tagPushEvents; + + /** + * Indicates if note events should be sent. + */ + @JsonProperty("note_events") private Boolean noteEvents; + + /** + * Indicates if confidential note events should be sent. + */ + @JsonProperty("confidential_note_events") private Boolean confidentialNoteEvents; + + /** + * Indicates if job events should be sent. + */ + @JsonProperty("job_events") private Boolean jobEvents; + + /** + * Indicates if pipeline events should be sent. + */ + @JsonProperty("pipeline_events") private Boolean pipelineEvents; + + /** + * Indicates if wiki page events should be sent. + */ + @JsonProperty("wiki_page_events") private Boolean wikiPageEvents; + + /** + * Indicates if deployment events should be sent. + */ + @JsonProperty("deployment_events") private Boolean deploymentEvents; + + /** + * Indicates if feature flag events should be sent. + */ + @JsonProperty("feature_flag_events") private Boolean featureFlagEvents; + + /** + * Indicates if release events should be sent. + */ + @JsonProperty("releases_events") private Boolean releasesEvents; + + /** + * Indicates if subgroup events should be sent. + */ + @JsonProperty("subgroup_events") private Boolean subgroupEvents; + + /** + * Indicates if member events should be sent. + */ + @JsonProperty("member_events") private Boolean memberEvents; + + /** + * Indicates if SSL verification should be enabled for the webhook. + */ + @JsonProperty("enable_ssl_verification") private Boolean enableSslVerification; + + /** + * The alert status of the webhook. + */ + @JsonProperty("alert_status") private String alertStatus; + + /** + * The date until the webhook is disabled. Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("disabled_until") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date disabledUntil; + + /** + * Indicates if repository update events should be sent. + */ + @JsonProperty("repository_update_events") private Boolean repositoryUpdateEvents; + + /** + * The creation date of the webhook. 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; + + /** + * Indicates if resource access token events should be sent. + */ + @JsonProperty("resource_access_token_events") private Boolean resourceAccessTokenEvents; + + /** + * A custom webhook template to use for the webhook. + */ + @JsonProperty("custom_webhook_template") private String customWebhookTemplate; public String getDescription() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java index e0fcb0019..245710cfc 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java @@ -4,32 +4,153 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + public class GroupHookParams implements Serializable { private static final long serialVersionUID = 1L; + /** + * The URL of the webhook. + */ + @JsonProperty("url") private String url; + + /** + * The name of the webhook. + */ + @JsonProperty("name") private String name; + + /** + * The description of the webhook. + */ + @JsonProperty("description") private String description; + + /** + * Indicates if push events should be sent. + */ + @JsonProperty("push_events") private Boolean pushEvents; + + /** + * The branch filter for push events. + */ + @JsonProperty("push_events_branch_filter") private String pushEventsBranchFilter; + + /** + * The strategy for filtering branches. + */ + @JsonProperty("branch_filter_strategy") private String branchFilterStrategy; + + /** + * Indicates if issue events should be sent. + */ + @JsonProperty("issues_events") private Boolean issuesEvents; + + /** + * Indicates if confidential issues events should be sent. + */ + @JsonProperty("confidential_issues_events") private Boolean confidentialIssuesEvents; + + /** + * Indicates if merge request events should be sent. + */ + @JsonProperty("merge_requests_events") private Boolean mergeRequestsEvents; + + /** + * Indicates if tag push events should be sent. + */ + @JsonProperty("tag_push_events") private Boolean tagPushEvents; + + /** + * Indicates if note events should be sent. + */ + @JsonProperty("note_events") private Boolean noteEvents; + + /** + * Indicates if confidential note events should be sent. + */ + @JsonProperty("confidential_note_events") private Boolean confidentialNoteEvents; + + /** + * Indicates if job events should be sent. + */ + @JsonProperty("job_events") private Boolean jobEvents; + + /** + * Indicates if pipeline events should be sent. + */ + @JsonProperty("pipeline_events") private Boolean pipelineEvents; + + /** + * Indicates if wiki page events should be sent. + */ + @JsonProperty("wiki_page_events") private Boolean wikiPageEvents; + + /** + * Indicates if deployment events should be sent. + */ + @JsonProperty("deployment_events") private Boolean deploymentEvents; + + /** + * Indicates if feature flag events should be sent. + */ + @JsonProperty("feature_flag_events") private Boolean featureFlagEvents; + + /** + * Indicates if release events should be sent. + */ + @JsonProperty("releases_events") private Boolean releasesEvents; + + /** + * Indicates if subgroup events should be sent. + */ + @JsonProperty("subgroup_events") private Boolean subgroupEvents; + + /** + * Indicates if member events should be sent. + */ + @JsonProperty("member_events") private Boolean memberEvents; + + /** + * Indicates if SSL verification should be enabled for the webhook. + */ + @JsonProperty("enable_ssl_verification") private Boolean enableSslVerification; + + /** + * The authentication token for the webhook. + */ + @JsonProperty("token") private String token; + + /** + * Indicates if resource access token events should be sent. + */ + @JsonProperty("resource_access_token_events") private Boolean resourceAccessTokenEvents; + + /** + * A custom webhook template to use for the webhook. + */ + @JsonProperty("custom_webhook_template") private String customWebhookTemplate; public GitLabForm getForm() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java index a9cc63cbd..1eb1b8bd1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java @@ -7,6 +7,8 @@ import org.gitlab4j.models.Constants.SubgroupCreationLevel; import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is utilized by the org.gitlab4j.api.GroupApi#createGroup(GroupParams) * and org.gitlab4j.api.GroupApi#updateGroup(Object, GroupParams) methods to set @@ -15,26 +17,130 @@ public class GroupParams implements Serializable { private static final long serialVersionUID = 1L; + /** + * The name of the project. + */ + @JsonProperty("name") private String name; + + /** + * The path of the project. + */ + @JsonProperty("path") private String path; + + /** + * The description of the project. + */ + @JsonProperty("description") private String description; + + /** + * The visibility of the project. + */ + @JsonProperty("visibility") private String visibility; + + /** + * Indicates if sharing with group is locked. + */ + @JsonProperty("share_with_group_lock") private Boolean shareWithGroupLock; + + /** + * Indicates if two-factor authentication is required. + */ + @JsonProperty("require_two_factor_authentication") private Boolean requireTwoFactorAuthentication; + + /** + * The grace period for two-factor authentication in days. + */ + @JsonProperty("two_factor_grace_period") private Integer twoFactorGracePeriod; + + /** + * The project creation level for the project. + */ + @JsonProperty("project_creation_level") private ProjectCreationLevel projectCreationLevel; + + /** + * Indicates if Auto DevOps is enabled. + */ + @JsonProperty("auto_devops_enabled") private Boolean autoDevopsEnabled; + + /** + * The subgroup creation level for the project. + */ + @JsonProperty("subgroup_creation_level") private SubgroupCreationLevel subgroupCreationLevel; + + /** + * Indicates if emails are disabled for the project. + */ + @JsonProperty("emails_disabled") private Boolean emailsDisabled; + + /** + * Indicates if large file storage (LFS) is enabled for the project. + */ + @JsonProperty("lfs_enabled") private Boolean lfsEnabled; + + /** + * Indicates if access requests are enabled for the project. + */ + @JsonProperty("request_access_enabled") private Boolean requestAccessEnabled; + + /** + * The parent project ID of the project. + */ + @JsonProperty("parent_id") private Long parentId; + + /** + * The shared runners minutes limit for the project. + */ + @JsonProperty("shared_runners_minutes_limit") private Integer sharedRunnersMinutesLimit; + + /** + * The extra shared runners minutes limit for the project. + */ + @JsonProperty("extra_shared_runners_minutes_limit") private Integer extraSharedRunnersMinutesLimit; + + /** + * The default branch protection level for the project. + */ + @JsonProperty("default_branch_protection") private DefaultBranchProtectionLevel defaultBranchProtection; + + /** + * Indicates if sharing groups outside the hierarchy is prevented. + */ + @JsonProperty("prevent_sharing_groups_outside_hierarchy") private Boolean preventSharingGroupsOutsideHierarchy; + + /** + * Indicates if forking outside the group is prevented. + */ + @JsonProperty("prevent_forking_outside_group") private Boolean preventForkingOutsideGroup; + + /** + * Indicates if membership lock is enabled. + */ + @JsonProperty("membership_lock") private Boolean membershipLock; + + /** + * The ID of the file template project. + */ + @JsonProperty("file_template_project_id") private Long fileTemplateProjectId; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java index f66582c96..8b79a2ca0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java @@ -7,24 +7,90 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used to filter Projects when getting lists of projects for a specified group. */ public class GroupProjectsFilter implements Serializable { private static final long serialVersionUID = 1L; + /** + * Indicates if the project is archived. + */ + @JsonProperty("archived") private Boolean archived; + + /** + * The visibility level of the project. + */ + @JsonProperty("visibility") private Visibility visibility; + + /** + * The ordering criteria for the project. + */ + @JsonProperty("order_by") private ProjectOrderBy orderBy; + + /** + * The sorting order for the project. + */ + @JsonProperty("sort") private SortOrder sort; + + /** + * A search string to filter projects by. + */ + @JsonProperty("search") private String search; + + /** + * Indicates if the project filter is simplified. + */ + @JsonProperty("simple") private Boolean simple; + + /** + * Indicates if the current user owns the project. + */ + @JsonProperty("owned") private Boolean owned; + + /** + * Indicates if the project is starred by the current user. + */ + @JsonProperty("starred") private Boolean starred; + + /** + * Indicates if the project has custom attributes. + */ + @JsonProperty("with_custom_attributes") private Boolean withCustomAttributes; + + /** + * Indicates if the project has issues enabled. + */ + @JsonProperty("with_issues_enabled") private Boolean withIssuesEnabled; + + /** + * Indicates if the project has merge requests enabled. + */ + @JsonProperty("with_merge_requests_enabled") private Boolean withMergeRequestsEnabled; + + /** + * Indicates if the project should include shared projects. + */ + @JsonProperty("with_shared") private Boolean withShared; + + /** + * Indicates if the project includes subgroups. + */ + @JsonProperty("include_subgroups") private Boolean includeSubGroups; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java index 1dc0f945b..ab6647407 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java @@ -5,6 +5,7 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -16,24 +17,52 @@ public class HealthCheckInfo implements Serializable { private static final long serialVersionUID = 1L; + /** + * The health check for the database. + */ + @JsonProperty("db_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem dbCheck; + /** + * The health check for Redis. + */ + @JsonProperty("redis_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem redisCheck; + /** + * The health check for the cache. + */ + @JsonProperty("cache_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem cacheCheck; + /** + * The health check for queues. + */ + @JsonProperty("queues_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem queuesCheck; + /** + * The health check for shared state. + */ + @JsonProperty("shared_state_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem sharedStateCheck; + /** + * The health check for file system shards. + */ + @JsonProperty("fs_shards_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem fsShardsCheck; + /** + * The health check for Gitaly. + */ + @JsonProperty("gitaly_check") @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem gitalyCheck; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java index 7126092df..be6f2492d 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java @@ -5,11 +5,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class HealthCheckItem implements Serializable { private static final long serialVersionUID = 1L; + /** + * The status of the health check. + */ + @JsonProperty("status") private HealthCheckStatus status; + + /** + * A map of labels associated with the health check. + */ + @JsonProperty("labels") private Map labels; + + /** + * The message associated with the health check status. + */ + @JsonProperty("message") private String message; public HealthCheckStatus getStatus() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java index 3aad9e02b..9f3e74934 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Identity implements Serializable { private static final long serialVersionUID = 1L; + /** + * The provider associated with the SAML configuration. + */ + @JsonProperty("provider") private String provider; + + /** + * The external user ID associated with the SAML provider. + */ + @JsonProperty("extern_uid") private String externUid; + + /** + * The ID of the SAML provider. + */ + @JsonProperty("saml_provider_id") private Integer samlProviderId; public String getProvider() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java index 7b210b7fe..3de4bf670 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java @@ -8,6 +8,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class ImpersonationToken implements Serializable { @@ -42,16 +44,76 @@ public String toString() { } } + /** + * Indicates if the token is active. + */ + @JsonProperty("active") private Boolean active; + + /** + * The token string. + */ + @JsonProperty("token") private String token; + + /** + * List of scopes associated with the token. + */ + @JsonProperty("scopes") private List scopes; + + /** + * The user ID associated with the token. + */ + @JsonProperty("user_id") private Long userId; + + /** + * Indicates if the token has been revoked. + */ + @JsonProperty("revoked") private Boolean revoked; + + /** + * The name of the token. + */ + @JsonProperty("name") private String name; + + /** + * The unique identifier of the token. + */ + @JsonProperty("id") private Long id; + + /** + * The creation date of the token. + * 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 last used date of the token. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("last_used_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUsedAt; + + /** + * Indicates if the token is used for impersonation. + */ + @JsonProperty("impersonation") private Boolean impersonation; + + /** + * The expiration date of the token. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; public Boolean getActive() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java index 07c1e1d46..e7591528f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java @@ -7,6 +7,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class ImportStatus implements Serializable { @@ -40,14 +42,60 @@ public String toString() { } } + /** + * The unique identifier of the import. + */ + @JsonProperty("id") private Long id; + + /** + * The description of the import. + */ + @JsonProperty("description") private String description; + + /** + * The name of the import. + */ + @JsonProperty("name") private String name; + + /** + * The name of the import with the associated namespace. + */ + @JsonProperty("name_with_namespace") private String nameWithNamespace; + + /** + * The path of the import. + */ + @JsonProperty("path") private String path; + + /** + * The path of the import with the associated namespace. + */ + @JsonProperty("path_with_namespace") private String pathWithNamespace; + + /** + * The creation date of the import. + * 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 import status. + */ + @JsonProperty("import_status") private Status importStatus; + + /** + * Any errors associated with the import. + */ + @JsonProperty("import_error") private String importError; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java index 9c895ac70..1e993e02e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java @@ -2,9 +2,12 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Issue extends AbstractIssue { private static final long serialVersionUID = 1L; + @JsonProperty("subscribed") private Boolean subscribed; public Boolean getSubscribed() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java index 22eb7c74a..45ee0eb93 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java @@ -6,6 +6,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class IssueEvent implements Serializable { @@ -34,11 +36,42 @@ public String toString() { } } + /** + * The unique identifier of the resource. + */ + @JsonProperty("id") private Long id; + + /** + * The user associated with the resource. + */ + @JsonProperty("user") private User user; + + /** + * The creation date of the resource. + * 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 String createdAt; + + /** + * The type of the resource. + */ + @JsonProperty("resource_type") private ResourceType resourceType; + + /** + * The ID of the resource. + */ + @JsonProperty("resource_id") private Long resourceId; + + /** + * The state of the resource. + */ + @JsonProperty("state") private String state; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java index 0e50e8ef0..3e37be9f8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java @@ -15,9 +15,7 @@ import org.gitlab4j.models.utils.ISO8601; import org.gitlab4j.models.utils.JacksonJsonEnumHelper; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.*; /** * This class is used to filter issues when getting lists of them. @@ -28,91 +26,113 @@ public class IssueFilter implements Serializable { /** * Return only the milestone having the given iid. */ + @JsonProperty("iids") private List iids; /** * {@link org.gitlab4j.models.Constants.IssueState} Return all issues or just those that are opened or closed. */ + @JsonProperty("state") private IssueState state; /** * Modify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description */ + @JsonProperty("in") private List in; /** * Comma-separated list of label names, issues must have all labels to be returned. No+Label lists all issues with no labels. */ + @JsonProperty("labels") private List labels; /** * The milestone title. No+Milestone lists all issues with no milestone. */ + @JsonProperty("milestone") private String milestone; /** * {@link org.gitlab4j.models.Constants.IssueScope} Return issues for the given scope: created_by_me, assigned_to_me or all. For versions before 11.0, use the now deprecated created-by-me or assigned-to-me scopes instead. */ + @JsonProperty("scope") private IssueScope scope; /** * Return issues created by the given user id. */ + @JsonProperty("author_id") private Long authorId; /** * Return issues assigned to the given user id. */ + @JsonProperty("assignee_id") private Long assigneeId; /** * Return issues reacted by the authenticated user by the given emoji. */ + @JsonProperty("my_reaction_emoji") private String myReactionEmoji; /** * {@link org.gitlab4j.models.Constants.IssueOrderBy} Return issues ordered by created_at or updated_at fields. Default is created_at. */ + @JsonProperty("order_by") private IssueOrderBy orderBy; /** * {@link org.gitlab4j.models.Constants.SortOrder} Return issues sorted in asc or desc order. Default is desc. */ + @JsonProperty("sort") private SortOrder sort; /** * Search project issues against their title and description. */ + @JsonProperty("search") private String search; /** * Return issues created on or after the given time. */ + @JsonProperty("created_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAfter; /** * Return issues created on or before the given time. */ + @JsonProperty("created_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdBefore; /** * Return issues updated on or after the given time. */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; /** * Return issues updated on or before the given time. */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; /** * Return issues in current iteration. */ + @JsonProperty("iteration_title") private String iterationTitle; /* * Return issues without these parameters */ + @JsonProperty("not") private Map not; public enum IssueField { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java index a62b39830..364c9ab23 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java @@ -4,11 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class IssueLink implements Serializable { private static final long serialVersionUID = 1L; + /** + * The source issue in the link. + */ + @JsonProperty("source_issue") private Issue sourceIssue; + + /** + * The target issue in the link. + */ + @JsonProperty("target_issue") private Issue targetIssue; + + /** + * The type of the link between the issues. + */ + @JsonProperty("link_type") private LinkType linkType; public Issue getSourceIssue() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java index f547e25fb..495dd2e48 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java @@ -5,10 +5,12 @@ import org.gitlab4j.models.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class IssuesStatistics implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("statistics") private Statistics statistics; public Statistics getStatistics() { @@ -27,6 +29,7 @@ public Counts getCounts() { public static class Statistics implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("counts") private Counts counts; public Counts getCounts() { @@ -42,8 +45,22 @@ public static class Counts implements Serializable { private static final long serialVersionUID = 1L; + /** + * The total number of issues. + */ + @JsonProperty("all") private Integer all; + + /** + * The number of closed issues. + */ + @JsonProperty("closed") private Integer closed; + + /** + * The number of opened issues. + */ + @JsonProperty("opened") private Integer opened; public Integer getAll() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java index ee328e96b..322279126 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java @@ -8,7 +8,9 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.ISO8601; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; /** * This class is used to filter issues when getting issue statistics. of them. @@ -16,19 +18,92 @@ public class IssuesStatisticsFilter implements Serializable { private static final long serialVersionUID = 1L; + /** + * List of labels to filter issues by. + */ + @JsonProperty("labels") private List labels; + + /** + * The milestone associated with the issues. + */ + @JsonProperty("milestone") private String milestone; + + /** + * The scope of the issues, e.g., assigned, created by, etc. + */ + @JsonProperty("scope") private IssueScope scope; + + /** + * The ID of the author of the issues. + */ + @JsonProperty("author_id") private Long authorId; + + /** + * The ID of the assignee of the issues. + */ + @JsonProperty("assignee_id") private Long assigneeId; + + /** + * The emoji reaction to filter by for the issues. + */ + @JsonProperty("my_reaction_emoji") private String myReactionEmoji; + + /** + * List of issue IDs to filter by. + */ + @JsonProperty("iids") private List iids; + + /** + * A search string to filter issues by. + */ + @JsonProperty("search") private String search; + + /** + * The field in which fuzzy search should be performed with the search query. + */ + @JsonProperty("in") private String in; + + /** + * Return issues created after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("created_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAfter; + + /** + * Return issues created before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("created_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdBefore; + + /** + * Return issues updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; + + /** + * Return issues updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; + + /** + * Return only confidential issues. + */ + @JsonProperty("confidential") private Boolean confidential; public IssuesStatisticsFilter withLabels(List labels) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java index adcad5805..6be0d4112 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java @@ -6,6 +6,8 @@ import org.gitlab4j.models.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Iteration implements Serializable { @@ -43,17 +45,84 @@ public String toString() { } } + /** + * The unique identifier of the iteration. + */ + @JsonProperty("id") private Long id; + + /** + * The internal identifier of the iteration. + */ + @JsonProperty("iid") private Long iid; + + /** + * The sequence number of the iteration. + */ + @JsonProperty("sequence") private Long sequence; + + /** + * The group ID associated with the iteration. + */ + @JsonProperty("group_id") private Long groupId; + + /** + * The title of the iteration. + */ + @JsonProperty("title") private String title; + + /** + * The description of the iteration. + */ + @JsonProperty("description") private String description; + + /** + * The current state of the iteration. + */ + @JsonProperty("state") private IterationState state; + + /** + * The creation date of the iteration. + * 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 last updated date of the iteration. + * 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 start date of the iteration. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("start_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startDate; + + /** + * The due date of the iteration. + * Expected in ISO 8601 format (2019-03-15T08:00:00Z). + */ + @JsonProperty("due_date") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date dueDate; + + /** + * The web URL for the iteration. + */ + @JsonProperty("web_url") private String webUrl; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java index bcb5d9176..890ecb8d2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java @@ -8,9 +8,7 @@ import org.gitlab4j.models.utils.ISO8601; import org.gitlab4j.models.utils.JacksonJsonEnumHelper; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.*; public class IterationFilter implements Serializable { private static final long serialVersionUID = 1L; @@ -67,31 +65,39 @@ public String toString() { /** * Return opened, upcoming, current, closed, or all iterations. */ + @JsonProperty("state") private IterationFilterState state; /** * Return only iterations with a title matching the provided string. */ + @JsonProperty("search") private String search; /** * Fields in which fuzzy search should be performed with the query given in the argument search. */ + @JsonProperty("in") private IterationFilterIn in; /** * Include iterations from parent group and its ancestors. Defaults to true. */ + @JsonProperty("include_ancestors") private Boolean includeAncestors; /** * Return iterations updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; /** * Return iterations updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; public IterationFilterState getState() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java index 151321d98..5dfd52287 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java @@ -6,34 +6,93 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Job implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("commit") private Commit commit; + + @JsonProperty("coverage") private String coverage; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date finishedAt; + + @JsonProperty("erased_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date erasedAt; + + @JsonProperty("artifacts_expire_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date artifactsExpireAt; + + @JsonProperty("name") private String name; + + @JsonProperty("pipeline") private Pipeline pipeline; + + @JsonProperty("ref") private String ref; + + @JsonProperty("runner") private Runner runner; + + @JsonProperty("user") private User user; + + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startedAt; + + @JsonProperty("artifacts_file") private ArtifactsFile artifactsFile; + + @JsonProperty("artifacts") private List artifacts; + + @JsonProperty("tag") private Boolean tag; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("stage") private String stage; + + @JsonProperty("status") private JobStatus status; + + @JsonProperty("failure_reason") private String failureReason; + + @JsonProperty("when") private String when; + + @JsonProperty("manual") private Boolean manual; + + @JsonProperty("allow_failure") private Boolean allowFailure; + + @JsonProperty("duration") private Float duration; + + @JsonProperty("queued_duration") private Float queuedDuration; + + @JsonProperty("project") private Project project; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java index cd95e2157..bcae0dfd0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class JobAttribute implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("key") private String key; + + @JsonProperty("value") private String value; public JobAttribute(String key, String value) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java index 6d936c66c..c6d4c6316 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java @@ -5,13 +5,26 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Key implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("id") private Long id; + + @JsonProperty("key") private String key; + + @JsonProperty("title") private String title; + + @JsonProperty("user") private User user; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java index e71d6f287..fd85d8730 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java @@ -6,20 +6,42 @@ import org.gitlab4j.models.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class Label implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("color") private String color; + + @JsonProperty("description") private String description; + + @JsonProperty("description_html") private String descriptionHtml; + + @JsonProperty("open_issues_count") private Integer openIssuesCount; + + @JsonProperty("closed_issues_count") private Integer closedIssuesCount; + + @JsonProperty("open_merge_requests_count") private Integer openMergeRequestsCount; + + @JsonProperty("subscribed") private Boolean subscribed; + + @JsonProperty("priority") private Integer priority; + + @JsonProperty("is_project_label") private Boolean isProjectLabel; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java index 3a5f0dbe7..eb0d74cca 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class LabelEvent implements Serializable { @@ -36,12 +37,25 @@ public String toString() { } } + @JsonProperty("id") private Long id; + + @JsonProperty("user") private User user; + + @JsonProperty("created_at") private String createdAt; + + @JsonProperty("resource_type") private ResourceType resourceType; + + @JsonProperty("resource_id") private Long resourceId; + + @JsonProperty("label") private Label label; + + @JsonProperty("action") private String action; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java index cd782c6c2..6a9e6f5eb 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java @@ -4,15 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class LdapGroupLink implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("cn") private String cn; + @JsonProperty("group_access") private AccessLevel groupAccess; + @JsonProperty("provider") private String provider; + @JsonProperty("filter") private String filter; public String getCn() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java index 7cff0f42f..35a06be49 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java @@ -6,20 +6,49 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class License implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("plan") private String plan; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("starts_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startsAt; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("historical_max") private Integer historicalMax; + + @JsonProperty("expired") private Boolean expired; + + @JsonProperty("overage") private Integer overage; + + @JsonProperty("user_limit") private Integer userLimit; + + @JsonProperty("active_users") private Integer activeUsers; + + @JsonProperty("licensee") private Map licensee; + + @JsonProperty("add_ons") private Map addOns; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java index 4958a030f..5f7e4d5ed 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java @@ -5,19 +5,42 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class LicenseTemplate implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("key") private String key; + + @JsonProperty("name") private String name; + + @JsonProperty("nickname") private String nickname; + + @JsonProperty("featured") private boolean featured; + + @JsonProperty("html_url") private String htmlUrl; + + @JsonProperty("source_url") private String sourceUrl; + + @JsonProperty("description") private String description; + + @JsonProperty("conditions") private List conditions; + + @JsonProperty("permissions") private List permissions; + + @JsonProperty("limitations") private List limitations; + + @JsonProperty("content") private String content; public String getKey() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java index ba6369af9..83204df19 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java @@ -4,11 +4,18 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Link implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Integer id; + + @JsonProperty("name") private String name; + + @JsonProperty("url") private String url; /** * @deprecated deprecated in GitLab 15.9, will be removed in GitLab 16.0. diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java index 4b668a5aa..c39446877 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java @@ -4,11 +4,23 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class LinkedIssue extends AbstractIssue { + @JsonProperty("issue_link_id") private Long issueLinkId; + + @JsonProperty("link_type") private LinkType linkType; + + @JsonProperty("link_created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date linkCreatedAt; + + @JsonProperty("link_updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date linkUpdatedAt; public Long getIssueLinkId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java index c5c6fd1aa..bfa1455eb 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java @@ -4,9 +4,12 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Markdown implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("html") private String html; public String getHtml() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java index 816e7dc3f..4f8e28c81 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java @@ -4,11 +4,20 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Member extends AbstractUser { private static final long serialVersionUID = 1L; + @JsonProperty("access_level") private AccessLevel accessLevel; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("group_saml_identity") private Identity groupSamlIdentity; public AccessLevel getAccessLevel() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java index dfec530e5..4fba6ba55 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java @@ -4,12 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Membership implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("source_id") private Long sourceId; + + @JsonProperty("source_name") private String sourceName; + + @JsonProperty("source_type") private MembershipSourceType sourceType; + + @JsonProperty("access_level") private AccessLevel accessLevel; public Long getSourceId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java index 3020d9447..b4b15fc5a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java @@ -6,85 +6,209 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class MergeRequest implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("allow_collaboration") private Boolean allowCollaboration; + + @JsonProperty("allow_maintainer_to_push") private Boolean allowMaintainerToPush; + + @JsonProperty("approvals_before_merge") private Integer approvalsBeforeMerge; + + @JsonProperty("assignee") private Assignee assignee; + + @JsonProperty("assignees") private List assignees; + + @JsonProperty("reviewers") private List reviewers; + + @JsonProperty("author") private Author author; + + @JsonProperty("blocking_discussions_resolved") private Boolean blockingDiscussionsResolved; + + @JsonProperty("changes") private List changes; + + @JsonProperty("changes_count") private String changesCount; + + @JsonProperty("closed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date closedAt; + + @JsonProperty("closed_by") private Participant closedBy; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("description") private String description; + + @JsonProperty("discussion_locked") private Boolean discussionLocked; + + @JsonProperty("diverged_commits_count") private Integer divergedCommitsCount; + + @JsonProperty("downvotes") private Integer downvotes; + + @JsonProperty("force_remove_source_branch") private Boolean forceRemoveSourceBranch; + + @JsonProperty("has_conflicts") private Boolean hasConflicts; + + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("labels") private List labels; + + @JsonProperty("latest_build_finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date latestBuildFinishedAt; + + @JsonProperty("latest_build_started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date latestBuildStartedAt; + + @JsonProperty("merge_commit_sha") private String mergeCommitSha; + + @JsonProperty("squash_commit_sha") private String squashCommitSha; + /** * @deprecated since 15.6, use {@link #detailedMergeStatus} instead. * see https://docs.gitlab.com/ee/update/deprecations.html#merge_status-api-field */ @Deprecated + @JsonProperty("merge_status") private String mergeStatus; + @JsonProperty("detailed_merge_status") private String detailedMergeStatus; + + @JsonProperty("merged_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date mergedAt; + /** * @deprecated since 14.7, use {@link #mergeUser} instead. * see https://docs.gitlab.com/ee/update/deprecations.html#merged_by-api-field */ + @Deprecated + @JsonProperty("merged_by") private Participant mergedBy; + @JsonProperty("merge_user") private Participant mergeUser; + + @JsonProperty("merge_when_pipeline_succeeds") private Boolean mergeWhenPipelineSucceeds; + + @JsonProperty("merge_error") private String mergeError; + + @JsonProperty("milestone") private Milestone milestone; + + @JsonProperty("pipeline") private Pipeline pipeline; + + @JsonProperty("head_pipeline") private Pipeline headPipeline; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("sha") private String sha; + + @JsonProperty("should_remove_source_branch") private Boolean shouldRemoveSourceBranch; + + @JsonProperty("source_branch") private String sourceBranch; + + @JsonProperty("source_project_id") private Long sourceProjectId; + + @JsonProperty("squash") private Boolean squash; + + @JsonProperty("state") private String state; + + @JsonProperty("subscribed") private Boolean subscribed; + + @JsonProperty("target_branch") private String targetBranch; + + @JsonProperty("target_project_id") private Long targetProjectId; + + @JsonProperty("task_completion_status") private TaskCompletionStatus taskCompletionStatus; + + @JsonProperty("references") private References references; + + @JsonProperty("time_stats") private TimeStats timeStats; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("upvotes") private Integer upvotes; + + @JsonProperty("user_notes_count") private Integer userNotesCount; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("work_in_progress") private Boolean workInProgress; + + @JsonProperty("diff_refs") private DiffRef diffRefs; + + @JsonProperty("rebase_in_progress") private Boolean rebaseInProgress; - // The approval fields will only be available when listing approvals, approving or unapproving a merge reuest. + // Approval-specific fields + @JsonProperty("approvals_required") private Integer approvalsRequired; + + @JsonProperty("approvals_left") private Integer approvalsLeft; + @JsonProperty("approved_by") @JsonSerialize(using = JacksonJson.UserListSerializer.class) @JsonDeserialize(using = JacksonJson.UserListDeserializer.class) private List approvedBy; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java index 2c3a52f75..0d06cc559 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class MergeRequestDiff extends MergeRequestVersion { private static final long serialVersionUID = 1L; + @JsonProperty("commits") private List commits; + + @JsonProperty("diffs") private List diffs; public List getCommits() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java index c3d13fab9..d07044b8b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java @@ -19,9 +19,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.JsonValue; +import com.fasterxml.jackson.annotation.*; /** * This class is used to filter merge requests when getting lists of them. @@ -29,33 +27,80 @@ public class MergeRequestFilter implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("iids") private List iids; + + @JsonProperty("state") private MergeRequestState state; + + @JsonProperty("order_by") private MergeRequestOrderBy orderBy; + + @JsonProperty("sort") private SortOrder sort; + + @JsonProperty("milestone") private String milestone; + + @JsonProperty("simple_view") private Boolean simpleView; + + @JsonProperty("labels") private List labels; + + @JsonProperty("created_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAfter; + + @JsonProperty("created_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdBefore; + + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; + + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; + + @JsonProperty("scope") private MergeRequestScope scope; /** * Filter MR by created by the given user id. Combine with scope=all or scope=assigned_to_me */ + @JsonProperty("author_id") private Long authorId; + @JsonProperty("assignee_id") private Long assigneeId; + + @JsonProperty("my_reaction_emoji") private String myReactionEmoji; + + @JsonProperty("source_branch") private String sourceBranch; + + @JsonProperty("target_branch") private String targetBranch; + + @JsonProperty("search") private String search; + + @JsonProperty("in") private MergeRequestSearchIn in; + + @JsonProperty("wip") private Boolean wip; + + @JsonProperty("not") private Map not; public enum MergeRequestField { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java index 5d9f93864..f479008c0 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java @@ -7,27 +7,60 @@ import org.gitlab4j.models.Constants.StateEvent; import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class provides the form parameters for creating and updating merge requests. */ public class MergeRequestParams implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("source_branch") private String sourceBranch; + + @JsonProperty("target_branch") private String targetBranch; + + @JsonProperty("title") private String title; + + @JsonProperty("assignee_id") private Long assigneeId; + + @JsonProperty("assignee_ids") private List assigneeIds; + + @JsonProperty("reviewer_ids") private List reviewerIds; + + @JsonProperty("milestone_id") private Long milestoneId; + + @JsonProperty("labels") private List labels; + + @JsonProperty("description") private String description; + + @JsonProperty("target_project_id") private Long targetProjectId; + + @JsonProperty("state_event") private StateEvent stateEvent; + + @JsonProperty("remove_source_branch") private Boolean removeSourceBranch; + + @JsonProperty("squash") private Boolean squash; + + @JsonProperty("discussion_locked") private Boolean discussionLocked; + + @JsonProperty("allow_collaboration") private Boolean allowCollaboration; + + @JsonProperty("approvals_before_merge") private Integer approvalsBeforeMerge; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java index 3e60b79e3..b72d108f1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java @@ -5,16 +5,35 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class MergeRequestVersion implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("head_commit_sha") private String headCommitSha; + + @JsonProperty("base_commit_sha") private String baseCommitSha; + + @JsonProperty("start_commit_sha") private String startCommitSha; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("merge_request_id") private Long mergeRequestId; + + @JsonProperty("state") private String state; + + @JsonProperty("real_size") private String realSize; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java index 35d42e878..ceb544b4d 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java @@ -9,9 +9,16 @@ public class Metadata implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("version") private String version; + + @JsonProperty("revision") private String revision; + + @JsonProperty("kas") private Kas kas; + + @JsonProperty("enterprise") private Boolean enterprise; public String getVersion() { @@ -53,11 +60,13 @@ public String toString() { private static class Kas { + @JsonProperty("enabled") private Boolean enabled; @JsonProperty("externalUrl") private String externalUrl; + @JsonProperty("version") private String version; public Boolean getEnabled() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java index eaeff6293..9ae0f8853 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java @@ -5,28 +5,54 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class Milestone implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("description") private String description; + @JsonProperty("start_date") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date startDate; + @JsonProperty("due_date") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date dueDate; + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("state") private String state; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("expired") private Boolean expired; + + @JsonProperty("web_url") private String webUrl; public Date getCreatedAt() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java index 4141f50dd..f4314a5f7 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java @@ -4,16 +4,33 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Namespace implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("path") private String path; + + @JsonProperty("kind") private String kind; + + @JsonProperty("full_path") private String fullPath; + + @JsonProperty("parent_id") private Long parentId; + + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("web_url") private String webUrl; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java index a76ba4ed4..0c47729df 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java @@ -7,6 +7,8 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Note implements Serializable { @@ -83,31 +85,74 @@ public String toString() { } } + @JsonProperty("attachment") private String attachment; + + @JsonProperty("author") private Author author; + + @JsonProperty("body") private String body; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("downvote") private Boolean downvote; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("file_name") private String fileName; + + @JsonProperty("id") private Long id; + + @JsonProperty("noteable_id") private Long noteableId; - // Use String for noteableType until the constant is fixed in the GitLab API - private String noteableType; + @JsonProperty("noteable_type") + private String noteableType; // Use String until the constant is fixed in the GitLab API + @JsonProperty("noteable_iid") private Long noteableIid; + + @JsonProperty("system") private Boolean system; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("upvote") private Boolean upvote; + + @JsonProperty("resolved") private Boolean resolved; + + @JsonProperty("resolvable") private Boolean resolvable; + + @JsonProperty("resolved_by") private Participant resolvedBy; + + @JsonProperty("resolved_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date resolvedAt; + + @JsonProperty("internal") private Boolean internal; + + @JsonProperty("type") private Type type; + @JsonProperty("position") private Position position; public String getAttachment() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java index 56d25c0ae..629464199 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class NotificationSettings implements Serializable { @@ -41,17 +42,40 @@ public String toString() { public static class Events implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("new_note") private Boolean newNote; + + @JsonProperty("new_issue") private Boolean newIssue; + + @JsonProperty("reopen_issue") private Boolean reopenIssue; + + @JsonProperty("close_issue") private Boolean closeIssue; + + @JsonProperty("reassign_issue") private Boolean reassignIssue; + + @JsonProperty("new_merge_request") private Boolean newMergeRequest; + + @JsonProperty("reopen_merge_request") private Boolean reopenMergeRequest; + + @JsonProperty("close_merge_request") private Boolean closeMergeRequest; + + @JsonProperty("reassign_merge_request") private Boolean reassignMergeRequest; + + @JsonProperty("merge_merge_request") private Boolean mergeMergeRequest; + + @JsonProperty("failed_pipeline") private Boolean failedPipeline; + + @JsonProperty("success_pipeline") private Boolean successPipeline; public Boolean getNewNote() { @@ -156,8 +180,13 @@ public String toString() { } } + @JsonProperty("level") private Level level; + + @JsonProperty("email") private String email; + + @JsonProperty("events") private Events events; public Level getLevel() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java index a4c1049c3..1f9c552a2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java @@ -2,13 +2,24 @@ import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonProperty; + public class OauthTokenResponse implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("access_token") private String accessToken; + + @JsonProperty("token_type") private String tokenType; + + @JsonProperty("refresh_token") private String refreshToken; + + @JsonProperty("scope") private String scope; + + @JsonProperty("created_at") private Long createdAt; public String getAccessToken() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java index a69e9fde8..9bd347d41 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java @@ -5,13 +5,26 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Package implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("version") private String version; + + @JsonProperty("package_type") private PackageType packageType; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java index b9c889561..3cc6cd4b1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java @@ -5,16 +5,35 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class PackageFile implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("package_id") private Long packageId; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("file_name") private String fileName; + + @JsonProperty("size") private Long size; + + @JsonProperty("file_md5") private String fileMd5; + + @JsonProperty("file_sha1") private String fileSha1; + + @JsonProperty("file_sha256") private String fileSha256; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java index 5efaa2d9b..1d14521f8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java @@ -7,19 +7,36 @@ import org.gitlab4j.models.Constants.SortOrder; import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used to filter Projects when getting lists of projects for a specified group. */ public class PackageFilter implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("exclude_subgroups") private Boolean excludeSubgroups; + + @JsonProperty("order_by") private PackageOrderBy orderBy; + + @JsonProperty("sort") private SortOrder sort; + + @JsonProperty("package_type") private PackageType packageType; + + @JsonProperty("package_name") private String packageName; + + @JsonProperty("include_versionless") private Boolean includeVersionless; + + @JsonProperty("status") private PackageStatus status; + + @JsonProperty("package_version") private String packageVersion; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java index f925f6cd7..405c72ed8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Permissions implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("project_access") private ProjectAccess projectAccess; + + @JsonProperty("group_access") private ProjectAccess groupAccess; public ProjectAccess getProjectAccess() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java index 46b53a3ef..55a242e20 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java @@ -7,23 +7,45 @@ import org.gitlab4j.models.Constants; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class PersonalAccessToken implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("user_id") private Long userId; + + @JsonProperty("scopes") private List scopes; + + @JsonProperty("name") private String name; + @JsonProperty("expires_at") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private Date expiresAt; + @JsonProperty("id") private Long id; + + @JsonProperty("active") private Boolean active; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("revoked") private Boolean revoked; + + @JsonProperty("last_used_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUsedAt; + + @JsonProperty("token") private String token; public Long getUserId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java index 682c28743..1b9b596cc 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java @@ -5,30 +5,81 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Pipeline implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("iid") private Long iid; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("status") private PipelineStatus status; + + @JsonProperty("source") private String source; + + @JsonProperty("ref") private String ref; + + @JsonProperty("sha") private String sha; + + @JsonProperty("before_sha") private String beforeSha; + + @JsonProperty("tag") private Boolean tag; + + @JsonProperty("yaml_errors") private String yamlErrors; + + @JsonProperty("user") private User user; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date startedAt; + + @JsonProperty("finished_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date finishedAt; + + @JsonProperty("committed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date committedAt; + + @JsonProperty("coverage") private String coverage; + + @JsonProperty("duration") private Integer duration; + + @JsonProperty("queued_duration") private Float queuedDuration; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("detailed_status") private DetailedStatus detailedStatus; + + @JsonProperty("name") private String name; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java index 0f87fd6ef..ed27f67b7 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java @@ -10,7 +10,9 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; /** * This class is used to filter Pipelines when getting lists of them. @@ -19,43 +21,53 @@ public class PipelineFilter implements Serializable { private static final long serialVersionUID = 1L; /** {@link org.gitlab4j.models.Constants.PipelineScope} The scope of pipelines, one of: running, pending, finished, branches, tags */ + @JsonProperty("scope") private PipelineScope scope; /** {@link org.gitlab4j.models.Constants.PipelineScope} The status of pipelines, one of: running, pending, success, failed, canceled, skipped, created */ + @JsonProperty("status") private PipelineStatus status; /** {@link org.gitlab4j.models.Constants.PipelineSource} The source of pipelines */ + @JsonProperty("source") private PipelineSource source; /** The ref of pipelines. */ + @JsonProperty("ref") private String ref; /** The SHA of pipelines. */ + @JsonProperty("sha") private String sha; /** If true, returns pipelines with invalid configurations. */ + @JsonProperty("yaml_errors") private Boolean yamlErrors; /** The name of the user who triggered pipelines. */ + @JsonProperty("name") private String name; /** The username of the user who triggered pipelines */ + @JsonProperty("username") private String username; /** Return pipelines updated after the specified date. */ + @JsonProperty("updated_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAfter; /** Return pipelines updated before the specified date. */ + @JsonProperty("updated_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedBefore; - /** - * {@link org.gitlab4j.models.Constants.PipelineOrderBy} Order pipelines by id, status, ref, updated_at or user_id (default: id). - */ + /** {@link org.gitlab4j.models.Constants.PipelineOrderBy} Order pipelines by id, status, ref, updated_at or user_id (default: id). */ + @JsonProperty("order_by") private PipelineOrderBy orderBy; - /** - * {@link org.gitlab4j.models.Constants.SortOrder} Return issues sorted in asc or desc order. Default is desc. - */ + /** {@link org.gitlab4j.models.Constants.SortOrder} Return issues sorted in asc or desc order. Default is desc. */ + @JsonProperty("sort") private SortOrder sort; public void setScope(PipelineScope scope) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java index b5f2e9909..e7ae57cb3 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java @@ -6,20 +6,49 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class PipelineSchedule implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("description") private String description; + + @JsonProperty("ref") private String ref; + + @JsonProperty("cron") private String cron; + + @JsonProperty("cron_timezone") private String cronTimezone; + + @JsonProperty("next_run_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date nextRunAt; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("active") private Boolean active; + + @JsonProperty("last_pipeline") private Pipeline lastPipeline; + + @JsonProperty("owner") private Owner owner; + + @JsonProperty("variables") private List variables; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java index f68446611..bbb4ca9a1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Position implements Serializable { @@ -34,19 +35,40 @@ public String toString() { } } + @JsonProperty("base_sha") private String baseSha; + + @JsonProperty("start_sha") private String startSha; + + @JsonProperty("head_sha") private String headSha; + + @JsonProperty("old_path") private String oldPath; + + @JsonProperty("new_path") private String newPath; + + @JsonProperty("position_type") private PositionType positionType; + @JsonProperty("old_line") private Integer oldLine; + + @JsonProperty("new_line") private Integer newLine; + @JsonProperty("width") private Integer width; + + @JsonProperty("height") private Integer height; + + @JsonProperty("x") private Double x; + + @JsonProperty("y") private Double y; public String getBaseSha() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java index 89d1d52ff..a24ec189d 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java @@ -12,10 +12,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.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class Project implements Serializable { @@ -45,86 +42,237 @@ public String toString() { } } + @JsonProperty("approvals_before_merge") private Integer approvalsBeforeMerge; + + @JsonProperty("archived") private Boolean archived; + + @JsonProperty("avatar_url") private String avatarUrl; + + @JsonProperty("container_registry_enabled") private Boolean containerRegistryEnabled; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("creator_id") private Long creatorId; + + @JsonProperty("default_branch") private String defaultBranch; + + @JsonProperty("description") private String description; + + @JsonProperty("forks_count") private Integer forksCount; + + @JsonProperty("forked_from_project") private Project forkedFromProject; + + @JsonProperty("http_url_to_repo") private String httpUrlToRepo; + + @JsonProperty("id") private Long id; + + @JsonProperty("public") private Boolean isPublic; + + @JsonProperty("issues_enabled") private Boolean issuesEnabled; + + @JsonProperty("jobs_enabled") private Boolean jobsEnabled; + + @JsonProperty("last_activity_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastActivityAt; + + @JsonProperty("lfs_enabled") private Boolean lfsEnabled; + + @JsonProperty("merge_method") private MergeMethod mergeMethod; + + @JsonProperty("merge_requests_enabled") private Boolean mergeRequestsEnabled; + + @JsonProperty("name") private String name; + + @JsonProperty("namespace") private Namespace namespace; + + @JsonProperty("name_with_namespace") private String nameWithNamespace; + + @JsonProperty("only_allow_merge_if_pipeline_succeeds") private Boolean onlyAllowMergeIfPipelineSucceeds; + + @JsonProperty("allow_merge_on_skipped_pipeline") private Boolean allowMergeOnSkippedPipeline; + + @JsonProperty("only_allow_merge_if_all_discussions_are_resolved") private Boolean onlyAllowMergeIfAllDiscussionsAreResolved; + + @JsonProperty("open_issues_count") private Integer openIssuesCount; + + @JsonProperty("owner") private Owner owner; + + @JsonProperty("path") private String path; + + @JsonProperty("path_with_namespace") private String pathWithNamespace; + + @JsonProperty("permissions") private Permissions permissions; + + @JsonProperty("public_jobs") private Boolean publicJobs; + + @JsonProperty("repository_storage") private String repositoryStorage; + + @JsonProperty("request_access_enabled") private Boolean requestAccessEnabled; + + @JsonProperty("runners_token") private String runnersToken; + + @JsonProperty("shared_runners_enabled") private Boolean sharedRunnersEnabled; + + @JsonProperty("shared_with_groups") private List sharedWithGroups; + + @JsonProperty("snippets_enabled") private Boolean snippetsEnabled; + + @JsonProperty("ssh_url_to_repo") private String sshUrlToRepo; + + @JsonProperty("star_count") private Integer starCount; + @JsonProperty("tag_list") private List tagList; + + @JsonProperty("topics") private List topics; + + @JsonProperty("visibility_level") private Integer visibilityLevel; + + @JsonProperty("visibility") private Visibility visibility; + + @JsonProperty("wall_enabled") private Boolean wallEnabled; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("wiki_enabled") private Boolean wikiEnabled; + + @JsonProperty("printing_merge_request_link_enabled") private Boolean printingMergeRequestLinkEnabled; + + @JsonProperty("resolve_outdated_diff_discussions") private Boolean resolveOutdatedDiffDiscussions; + + @JsonProperty("statistics") private ProjectStatistics statistics; + + @JsonProperty("initialize_with_readme") private Boolean initializeWithReadme; + + @JsonProperty("packages_enabled") private Boolean packagesEnabled; + + @JsonProperty("empty_repo") private Boolean emptyRepo; + + @JsonProperty("license_url") private String licenseUrl; + + @JsonProperty("license") private ProjectLicense license; + + @JsonProperty("custom_attributes") private List customAttributes; + + @JsonProperty("build_coverage_regex") private String buildCoverageRegex; + + @JsonProperty("build_git_strategy") private BuildGitStrategy buildGitStrategy; + + @JsonProperty("readme_url") private String readmeUrl; + + @JsonProperty("can_create_merge_request_in") private Boolean canCreateMergeRequestIn; + + @JsonProperty("import_status") private Status importStatus; + + @JsonProperty("ci_default_git_depth") private Integer ciDefaultGitDepth; + + @JsonProperty("ci_forward_deployment_enabled") private Boolean ciForwardDeploymentEnabled; + + @JsonProperty("ci_config_path") private String ciConfigPath; + + @JsonProperty("remove_source_branch_after_merge") private Boolean removeSourceBranchAfterMerge; + + @JsonProperty("auto_devops_enabled") private Boolean autoDevopsEnabled; + + @JsonProperty("auto_devops_deploy_strategy") private AutoDevopsDeployStrategy autoDevopsDeployStrategy; + + @JsonProperty("autoclose_referenced_issues") private Boolean autocloseReferencedIssues; + + @JsonProperty("emails_disabled") private Boolean emailsDisabled; + + @JsonProperty("suggestion_commit_message") private String suggestionCommitMessage; + + @JsonProperty("squash_option") private SquashOption squashOption; + + @JsonProperty("merge_commit_template") private String mergeCommitTemplate; + + @JsonProperty("squash_commit_template") private String squashCommitTemplate; + + @JsonProperty("issue_branch_template") private String issueBranchTemplate; + + @JsonProperty("merge_requests_template") private String mergeRequestsTemplate; + + @JsonProperty("issues_template") private String issuesTemplate; @JsonProperty("_links") private Map links; + @JsonProperty("marked_for_deletion_on") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date markedForDeletionOn; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java index 40d952863..cbb4e69ab 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProjectAccess implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("access_level") private AccessLevel accessLevel; + + @JsonProperty("notification_level") private int notificationLevel; public AccessLevel getAccessLevel() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java index 44b6c93e8..4ee2c2bd8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java @@ -7,19 +7,46 @@ import org.gitlab4j.models.Constants; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProjectAccessToken implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("user_id") private Long userId; + + @JsonProperty("scopes") private List scopes; + + @JsonProperty("name") private String name; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("id") private Long id; + + @JsonProperty("active") private Boolean active; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("revoked") private Boolean revoked; + + @JsonProperty("access_level") private Long accessLevel; + + @JsonProperty("last_used_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUsedAt; + + @JsonProperty("token") private String token; public Long getUserId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java index 25b14bc56..01f99b569 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java @@ -5,16 +5,30 @@ import org.gitlab4j.models.GitLabForm; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class ProjectApprovalsConfig implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("approvals_before_merge") private Integer approvalsBeforeMerge; + + @JsonProperty("reset_approvals_on_push") private Boolean resetApprovalsOnPush; + + @JsonProperty("selective_code_owner_removals") private Boolean selectiveCodeOwnerRemovals; + + @JsonProperty("disable_overriding_approvers_per_merge_request") private Boolean disableOverridingApproversPerMergeRequest; + + @JsonProperty("merge_requests_author_approval") private Boolean mergeRequestsAuthorApproval; + + @JsonProperty("merge_requests_disable_committers_approval") private Boolean mergeRequestsDisableCommittersApproval; + + @JsonProperty("require_password_to_approve") private Boolean requirePasswordToApprove; public Integer getApprovalsBeforeMerge() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java index 0ff707fd5..830835ac5 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java @@ -6,6 +6,7 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class ProjectFetches implements Serializable { @@ -15,8 +16,10 @@ public static class DateCount implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("count") private Integer count; + @JsonProperty("date") @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date date; @@ -40,7 +43,10 @@ public void setDate(Date date) { public static class Fetches implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("total") private Integer total; + + @JsonProperty("days") private List days; public Integer getTotal() { @@ -60,6 +66,7 @@ public void setDays(List days) { } } + @JsonProperty("fetches") private Fetches fetches; public Fetches getFetches() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java index 94cec0ca2..98f379879 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java @@ -9,37 +9,93 @@ import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used to filter Projects when getting lists of projects for a specified user. */ public class ProjectFilter implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("archived") private Boolean archived; + + @JsonProperty("visibility") private Visibility visibility; + + @JsonProperty("order_by") private ProjectOrderBy orderBy; + + @JsonProperty("sort") private SortOrder sort; + + @JsonProperty("search") private String search; + + @JsonProperty("search_namespaces") private Boolean searchNamespaces; + + @JsonProperty("simple") private Boolean simple; + + @JsonProperty("owned") private Boolean owned; + + @JsonProperty("membership") private Boolean membership; + + @JsonProperty("starred") private Boolean starred; + + @JsonProperty("statistics") private Boolean statistics; + + @JsonProperty("with_custom_attributes") private Boolean withCustomAttributes; + + @JsonProperty("with_issues_enabled") private Boolean withIssuesEnabled; + + @JsonProperty("with_merge_requests_enabled") private Boolean withMergeRequestsEnabled; + + @JsonProperty("with_programming_language") private String withProgrammingLanguage; + + @JsonProperty("wiki_checksum_failed") private Boolean wikiChecksumFailed; + + @JsonProperty("repository_checksum_failed") private Boolean repositoryChecksumFailed; + + @JsonProperty("min_access_level") private AccessLevel minAccessLevel; + + @JsonProperty("id_after") private Long idAfter; + + @JsonProperty("id_before") private Long idBefore; + + @JsonProperty("last_activity_after") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastActivityAfter; + + @JsonProperty("last_activity_before") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastActivityBefore; + + @JsonProperty("repository_storage") private String repositoryStorage; + + @JsonProperty("imported") private Boolean imported; + + @JsonProperty("topic") private String topic; + + @JsonProperty("topic_id") private Integer topic_id; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java index 44b21913e..c5fbf0f93 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java @@ -5,16 +5,27 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is used to filter Groups when getting lists of groups for a specified project. */ public class ProjectGroupsFilter implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("search") private String search; + + @JsonProperty("shared_min_access_level") private AccessLevel sharedMinAccessLevel; + + @JsonProperty("shared_visible_only") private Boolean sharedVisibleOnly; + + @JsonProperty("skip_groups") private List skipGroups; + + @JsonProperty("with_shared") private Boolean withShared; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java index c3ce5f293..e4613eaed 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java @@ -5,33 +5,77 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProjectHook implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("build_events") private Boolean buildEvents; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("enable_ssl_verification") private Boolean enableSslVerification; + + @JsonProperty("id") private Long id; + + @JsonProperty("issues_events") private Boolean issuesEvents; + + @JsonProperty("merge_requests_events") private Boolean mergeRequestsEvents; + + @JsonProperty("note_events") private Boolean noteEvents; + + @JsonProperty("job_events") private Boolean jobEvents; + + @JsonProperty("pipeline_events") private Boolean pipelineEvents; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("push_events") private Boolean pushEvents; + + @JsonProperty("tag_push_events") private Boolean tagPushEvents; + + @JsonProperty("url") private String url; + + @JsonProperty("wiki_page_events") private Boolean wikiPageEvents; + + @JsonProperty("token") private String token; + @JsonProperty("repository_update_events") private Boolean repositoryUpdateEvents; + + @JsonProperty("confidential_issues_events") private Boolean confidentialIssuesEvents; + + @JsonProperty("confidential_note_events") private Boolean confidentialNoteEvents; + + @JsonProperty("push_events_branch_filter") private String pushEventsBranchFilter; + @JsonProperty("deployment_events") private Boolean deploymentEvents; + + @JsonProperty("releases_events") private Boolean releasesEvents; + @JsonProperty("description") private String description; public Boolean getBuildEvents() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectLicense.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectLicense.java index 553d9f181..a31762359 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectLicense.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectLicense.java @@ -2,12 +2,23 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProjectLicense { + @JsonProperty("key") private String key; + + @JsonProperty("name") private String name; + + @JsonProperty("nickname") private String nickname; + + @JsonProperty("html_url") private String htmlUrl; + + @JsonProperty("source_url") private String sourceUrl; public String getKey() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java index d622a229a..9cd90d61b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java @@ -4,6 +4,8 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class contains the sizing information from the project. To get this information, * ProjectApi.getProject() has to be called with parameter statistics=true @@ -12,13 +14,26 @@ public class ProjectStatistics implements Serializable { private static final long serialVersionUID = 1L; - long commitCount; - long storageSize; - long repositorySize; - long wikiSize; - long lfsObjectsSize; - long jobArtifactsSize; - long packagesSize; + @JsonProperty("commit_count") + private long commitCount; + + @JsonProperty("storage_size") + private long storageSize; + + @JsonProperty("repository_size") + private long repositorySize; + + @JsonProperty("wiki_size") + private long wikiSize; + + @JsonProperty("lfs_objects_size") + private long lfsObjectsSize; + + @JsonProperty("job_artifacts_size") + private long jobArtifactsSize; + + @JsonProperty("packages_size") + private long packagesSize; public long getCommitCount() { return commitCount; diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java index 947fecf16..28e055acf 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java @@ -5,15 +5,30 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProtectedBranch implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("push_access_levels") private List pushAccessLevels; + + @JsonProperty("merge_access_levels") private List mergeAccessLevels; + + @JsonProperty("unprotect_access_levels") private List unprotectAccessLevels; + + @JsonProperty("code_owner_approval_required") private Boolean codeOwnerApprovalRequired; + + @JsonProperty("allow_force_push") private Boolean allowForcePush; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java index 46760a060..725a64fb2 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java @@ -5,13 +5,18 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ProtectedTag implements Serializable { private static final long serialVersionUID = 1L; public static class CreateAccessLevel implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("access_level") private AccessLevel access_level; + + @JsonProperty("access_level_description") private String accessLevelDescription; public AccessLevel getAccess_level() { @@ -31,7 +36,10 @@ public void setAccessLevelDescription(String accessLevelDescription) { } } + @JsonProperty("name") private String name; + + @JsonProperty("create_access_levels") private List createAccessLevels; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java index e0c14876e..06aea8878 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java @@ -3,14 +3,29 @@ import org.gitlab4j.models.Constants.ActionType; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class PushData { + @JsonProperty("commit_count") private Integer commitCount; + + @JsonProperty("action") private ActionType action; + + @JsonProperty("ref_type") private String refType; + + @JsonProperty("commit_from") private String commitFrom; + + @JsonProperty("commit_to") private String commitTo; + + @JsonProperty("ref") private String ref; + + @JsonProperty("commit_title") private String commitTitle; public Integer getCommitCount() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java index b94b4af74..5ce298c93 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java @@ -5,23 +5,56 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class PushRules implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("project_id") private Long projectId; + + @JsonProperty("commit_message_regex") private String commitMessageRegex; + + @JsonProperty("commit_message_negative_regex") private String commitMessageNegativeRegex; + + @JsonProperty("branch_name_regex") private String branchNameRegex; + + @JsonProperty("deny_delete_tag") private Boolean denyDeleteTag; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("member_check") private Boolean memberCheck; + + @JsonProperty("prevent_secrets") private Boolean preventSecrets; + + @JsonProperty("author_email_regex") private String authorEmailRegex; + + @JsonProperty("file_name_regex") private String fileNameRegex; + + @JsonProperty("max_file_size") private Integer maxFileSize; + + @JsonProperty("commit_committer_check") private Boolean commitCommitterCheck; + + @JsonProperty("commit_committer_name_check") private Boolean commitCommitterNameCheck; + + @JsonProperty("reject_unsigned_commits") private Boolean rejectUnsignedCommits; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java index c20841dbc..a7d49d4fd 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java @@ -12,7 +12,10 @@ public class References implements Serializable { @JsonProperty("short") private String _short; + @JsonProperty("relative") private String relative; + + @JsonProperty("full") private String full; public String getShort() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java index c6d79e794..b77ec4834 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java @@ -5,13 +5,26 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RegistryRepository implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("name") private String name; + + @JsonProperty("path") private String path; + + @JsonProperty("location") private String location; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java index 721df1243..d905fb172 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java @@ -5,16 +5,35 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RegistryRepositoryTag implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("name") private String name; + + @JsonProperty("path") private String path; + + @JsonProperty("location") private String location; + + @JsonProperty("revision") private String revision; + + @JsonProperty("short_revision") private String shortRevision; + + @JsonProperty("digest") private String digest; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("total_size") private Long totalSize; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java index 92671519f..2e81d313d 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java @@ -4,15 +4,34 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RelatedEpic extends AbstractEpic { private static final long serialVersionUID = 1L; + @JsonProperty("start_date_is_fixed") private Boolean startDateIsFixed; + + @JsonProperty("due_date_is_fixed") private Boolean dueDateIsFixed; + + @JsonProperty("due_date_from_inherited_source") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date dueDateFromInheritedSource; + + @JsonProperty("related_epic_link_id") private Long relatedEpicLinkId; + + @JsonProperty("link_type") private LinkType linkType; + + @JsonProperty("link_created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date linkCreatedAt; + + @JsonProperty("link_updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date linkUpdatedAt; public Boolean getStartDateIsFixed() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java index 319c3cc1a..39e6225f3 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java @@ -5,14 +5,30 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RelatedEpicLink implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("source_epic") private EpicInLink sourceEpic; + + @JsonProperty("target_epic") private EpicInLink targetEpic; + + @JsonProperty("link_type") private LinkType linkType; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java index 1df5d272c..39365bd44 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java @@ -7,24 +7,52 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; public class Release implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("name") private String name; + + @JsonProperty("tag_name") private String tagName; + + @JsonProperty("description") private String description; + + @JsonProperty("description_html") private String descriptionHtml; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("released_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date releasedAt; + + @JsonProperty("author") private Author author; + + @JsonProperty("commit") private Commit commit; + + @JsonProperty("milestones") private List milestones; + + @JsonProperty("commit_path") private String commitPath; + + @JsonProperty("tag_path") private String tagPath; + + @JsonProperty("evidence_sha") private String evidenceSha; + + @JsonProperty("assets") private Assets assets; @JsonProperty("_links") diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java index a308cca96..cb3956edf 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java @@ -2,12 +2,23 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ReleaseLinkParams { + @JsonProperty("name") private String name; + + @JsonProperty("tag_name") private String tagName; + + @JsonProperty("url") private String url; + + @JsonProperty("filepath") private String filepath; + + @JsonProperty("link_type") private String linkType; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java index 00e7c339a..1f92b9a82 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java @@ -6,15 +6,32 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class ReleaseParams implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("name") private String name; + + @JsonProperty("tag_name") private String tagName; + + @JsonProperty("description") private String description; + + @JsonProperty("ref") private String ref; + + @JsonProperty("milestones") private List milestones; + + @JsonProperty("assets") private Assets assets; + + @JsonProperty("released_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date releasedAt; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java index 3075ac680..6aa2724bf 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java @@ -5,18 +5,43 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RemoteMirror implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("enabled") private Boolean enabled; + + @JsonProperty("last_error") private String lastError; + + @JsonProperty("last_successful_update_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastSuccessfulUpdateAt; + + @JsonProperty("last_update_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUpdateAt; + + @JsonProperty("last_update_started_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUpdateStartedAt; + + @JsonProperty("only_protected_branches") private Boolean onlyProtectedBranches; + + @JsonProperty("keep_divergent_refs") private Boolean keepDivergentRefs; + + @JsonProperty("update_status") private String updateStatus; + + @JsonProperty("url") private String url; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java index 133c5b65a..4c292fa2b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java @@ -4,12 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Repository implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("description") private String description; + + @JsonProperty("homepage") private String homepage; + + @JsonProperty("name") private String name; + + @JsonProperty("url") private String url; public String getDescription() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java index f241de6cd..59db66acf 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java @@ -2,12 +2,17 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * Params for getting file archive of the repository. */ public class RepositoryArchiveParams { + @JsonProperty("sha") private String sha; + + @JsonProperty("path") private String path; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java index 87c7e7db7..1823dd669 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java @@ -7,19 +7,39 @@ import org.gitlab4j.models.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class RepositoryFile implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("file_name") private String fileName; // file name only, Ex. class.rb + + @JsonProperty("file_path") private String filePath; // full path to file. Ex. lib/class.rb + + @JsonProperty("size") private Integer size; + + @JsonProperty("encoding") private Encoding encoding; + + @JsonProperty("content") private String content; + + @JsonProperty("content_sha256") private String contentSha256; + + @JsonProperty("ref") private String ref; + + @JsonProperty("blob_id") private String blobId; + + @JsonProperty("commit_id") private String commitId; + + @JsonProperty("last_commit_id") private String lastCommitId; public String getFileName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java index 92387e9ef..809f6e524 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class RepositoryFileResponse implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("file_path") private String filePath; // full path to file. Ex. lib/class.rb + + @JsonProperty("branch") private String branch; public String getFilePath() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java index 78c50a4e4..b8790f777 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java @@ -6,20 +6,35 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class Runner implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("description") private String description; + + @JsonProperty("active") private Boolean active; + + @JsonProperty("is_shared") private Boolean isShared; + + @JsonProperty("name") private String name; + + @JsonProperty("online") private Boolean online; + + @JsonProperty("status") private RunnerStatus status; - private String ipAddress; + @JsonProperty("ip_address") + private String ipAddress; /** * Enum to use for RunnersApi filtering on status. */ diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java index 1d88fb014..d20f12fcc 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java @@ -7,19 +7,39 @@ import org.gitlab4j.models.utils.JacksonJsonEnumHelper; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; public class RunnerDetail extends Runner { private static final long serialVersionUID = 1L; + @JsonProperty("architecture") private String architecture; + + @JsonProperty("platform") private String platform; + + @JsonProperty("contacted_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date contactedAt; + + @JsonProperty("projects") private List projects; + + @JsonProperty("token") private String token; + + @JsonProperty("revision") private String revision; + + @JsonProperty("tag_list") private List tagList; + + @JsonProperty("version") private String version; + + @JsonProperty("access_level") private RunnerAccessLevel accessLevel; /** diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java index 72f80a4f6..3ad178e69 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java @@ -4,13 +4,18 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class SamlGroupLink implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("name") private String name; + @JsonProperty("access_level") private AccessLevel accessLevel; + @JsonProperty("member_role_id") private int memberRoleId; public String getName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java index ecbc6dd93..8c07bb386 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java @@ -4,15 +4,30 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class SearchBlob implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("basename") private String basename; + + @JsonProperty("data") private String data; + + @JsonProperty("filename") private String filename; + + @JsonProperty("id") private String id; + + @JsonProperty("ref") private String ref; + + @JsonProperty("startline") private Integer startline; + + @JsonProperty("project_id") private Long projectId; public String getBasename() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java index 033812eb6..297402f74 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java @@ -5,14 +5,22 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class SharedGroup implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("group_id") private Long groupId; + + @JsonProperty("group_name") private String groupName; + + @JsonProperty("group_full_path") private String groupFullPath; + + @JsonProperty("group_access_level") private AccessLevel groupAccessLevel; @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java index 93e03c908..8598c9d35 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java @@ -28,20 +28,48 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Snippet implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("author") private Author author; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + + @JsonProperty("file_name") private String fileName; + + @JsonProperty("id") private Long id; + + @JsonProperty("title") private String title; + + @JsonProperty("updated_at") private String updatedAt; + + @JsonProperty("web_url") private String webUrl; + + @JsonProperty("content") private String content; + + @JsonProperty("raw_url") private String rawUrl; + + @JsonProperty("visibility") private Visibility visibility; + + @JsonProperty("description") private String description; public Snippet() {} diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java index 971cbf43e..3e62a1c30 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java @@ -5,17 +5,31 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; public class SshKey implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("title") private String title; + + @JsonProperty("key") private String key; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("expires_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date expiresAt; + @JsonProperty("user_id") private Long userId; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java index c04e51054..42887cb88 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java @@ -5,16 +5,35 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class SystemHook implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("url") private String url; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("push_events") private Boolean pushEvents; + + @JsonProperty("tag_push_events") private Boolean tagPushEvents; + + @JsonProperty("enable_ssl_verification") private Boolean enableSslVerification; + + @JsonProperty("repository_update_events") private Boolean repositoryUpdateEvents; + + @JsonProperty("merge_requests_events") private Boolean mergeRequestsEvents; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java index d391ac8a2..a88be54b1 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java @@ -5,13 +5,26 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Tag implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("commit") private Commit commit; + + @JsonProperty("message") private String message; + + @JsonProperty("name") private String name; + + @JsonProperty("release") private Release release; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; public Commit getCommit() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java index 112679978..95b547337 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class TaskCompletionStatus implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("count") private Integer count; + + @JsonProperty("completed_count") private Integer completedCount; public Integer getCount() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java index 83bf7b3bc..96d68edce 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java @@ -4,12 +4,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class TimeStats implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("time_estimate") private Integer timeEstimate; + + @JsonProperty("total_time_spent") private Integer totalTimeSpent; + + @JsonProperty("human_time_estimate") private Duration humanTimeEstimate; + + @JsonProperty("human_total_time_spent") private Duration humanTotalTimeSpent; public Integer getTimeEstimate() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java index 31dd036f2..c95be0e22 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java @@ -9,7 +9,9 @@ import org.gitlab4j.models.Constants.TodoType; import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; @@ -21,18 +23,36 @@ public class Todo implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("project") private Project project; + + @JsonProperty("author") private Author author; + + @JsonProperty("action_name") private TodoAction actionName; + + @JsonProperty("target_type") private TodoType targetType; + @JsonProperty("target") @JsonDeserialize(using = TargetDeserializer.class) private Object target; + @JsonProperty("target_url") private String targetUrl; + + @JsonProperty("body") private String body; + + @JsonProperty("state") private TodoState state; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java index 9bcdfbbd8..512a3e046 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java @@ -4,19 +4,27 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Topic implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Integer id; + @JsonProperty("name") private String name; + @JsonProperty("title") private String title; + @JsonProperty("description") private String description; + @JsonProperty("total_projects_count") private int totalProjectsCount; + @JsonProperty("avatar_url") private String avatarUrl; public Integer getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java index 4acf16ab5..a47a5bf13 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java @@ -4,6 +4,8 @@ import org.gitlab4j.models.GitLabForm; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * This class is utilized by the org.gitlab4j.api.TopicsApi#createTopic(TopicParams) * and org.gitlab4j.api.TopicsApi#updateTopic(Integer, TopicParams) methods to set @@ -14,8 +16,13 @@ public class TopicParams implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("name") private String name; + + @JsonProperty("title") private String title; + + @JsonProperty("description") private String description; public TopicParams withName(String name) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java index 89745a61c..3bdb1fe9a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java @@ -4,6 +4,8 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class TreeItem implements Serializable { private static final long serialVersionUID = 1L; @@ -17,10 +19,19 @@ public String toString() { } } + @JsonProperty("id") private String id; + + @JsonProperty("mode") private String mode; + + @JsonProperty("name") private String name; + + @JsonProperty("path") private String path; + + @JsonProperty("type") private Type type; public String getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java index ebb37d019..acbc1eeb9 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java @@ -3,15 +3,34 @@ import java.io.Serializable; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Trigger implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("description") private String description; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("last_used") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastUsed; + + @JsonProperty("token") private String token; + + @JsonProperty("updated_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date updatedAt; + + @JsonProperty("owner") private User owner; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java index f97d29002..c567b0cb8 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java @@ -4,11 +4,18 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class UploadedByUser implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("username") private String username; + + @JsonProperty("name") private String name; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java index f0a594179..29f39d120 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java @@ -5,13 +5,26 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class UploadedFile implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("id") private Long id; + + @JsonProperty("size") private Long size; + + @JsonProperty("filename") private String filename; + + @JsonProperty("created_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date createdAt; + + @JsonProperty("uploaded_by") private UploadedByUser uploadedBy; public Long getId() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java index 04d28ab88..aa7ff7491 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java @@ -5,39 +5,107 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + public class User extends AbstractUser { private static final long serialVersionUID = 1L; + @JsonProperty("bio") private String bio; + + @JsonProperty("bot") private Boolean bot; + + @JsonProperty("can_create_group") private Boolean canCreateGroup; + + @JsonProperty("can_create_project") private Boolean canCreateProject; + + @JsonProperty("color_scheme_id") private Integer colorSchemeId; + + @JsonProperty("confirmed_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date confirmedAt; + + @JsonProperty("current_sign_in_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date currentSignInAt; + + @JsonProperty("custom_attributes") private List customAttributes; + + @JsonProperty("external") private Boolean external; + + @JsonProperty("extern_uid") private String externUid; + + @JsonProperty("extra_shared_runners_minutes_limit") private Integer extraSharedRunnersMinutesLimit; + + @JsonProperty("identities") private List identities; + + @JsonProperty("is_admin") private Boolean isAdmin; + + @JsonProperty("last_activity_on") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastActivityOn; + + @JsonProperty("last_sign_in_at") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") private Date lastSignInAt; + + @JsonProperty("linkedin") private String linkedin; + + @JsonProperty("location") private String location; + + @JsonProperty("namespace_id") private Long namespaceId; + + @JsonProperty("organization") private String organization; + + @JsonProperty("private_profile") private Boolean privateProfile; + + @JsonProperty("projects_limit") private Integer projectsLimit; + + @JsonProperty("provider") private String provider; + + @JsonProperty("public_email") private String publicEmail; + + @JsonProperty("shared_runners_minutes_limit") private Integer sharedRunnersMinutesLimit; + + @JsonProperty("skype") private String skype; + + @JsonProperty("state") private String state; + + @JsonProperty("theme_id") private Integer themeId; + + @JsonProperty("twitter") private String twitter; + + @JsonProperty("two_factor_enabled") private Boolean twoFactorEnabled; + + @JsonProperty("website_url") private String websiteUrl; + + @JsonProperty("skip_confirmation") private Boolean skipConfirmation; public String getBio() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java index 3c7160572..f765a67fe 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java @@ -40,8 +40,13 @@ public String toString() { } } + @JsonProperty("key") private String key; + + @JsonProperty("value") private String value; + + @JsonProperty("variable_type") private Type variableType; @JsonProperty("protected") @@ -50,6 +55,7 @@ public String toString() { @JsonProperty("masked") private Boolean isMasked; + @JsonProperty("environment_scope") private String environmentScope; public Variable() {} diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java index e2e60644e..5426e132b 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java @@ -4,10 +4,15 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Version implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("version") private String version; + + @JsonProperty("revision") private String revision; public String getVersion() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java index c4b386459..784903f8a 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java @@ -4,6 +4,8 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class WikiAttachment implements Serializable { private static final long serialVersionUID = 1L; @@ -35,9 +37,16 @@ public String toString() { } } + @JsonProperty("file_name") private String fileName; + + @JsonProperty("file_path") private String filePath; + + @JsonProperty("branch") private String branch; + + @JsonProperty("link") private Link link; public String getFileName() { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java index f645e5e1b..8472b8664 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java @@ -27,12 +27,21 @@ import org.gitlab4j.models.utils.JacksonJson; +import com.fasterxml.jackson.annotation.JsonProperty; + public class WikiPage implements Serializable { private static final long serialVersionUID = 1L; + @JsonProperty("title") private String title; + + @JsonProperty("content") private String content; + + @JsonProperty("slug") private String slug; + + @JsonProperty("format") private String format; public WikiPage() {} From caa9359acd913545b87c7daa6e2cd4950192e4de Mon Sep 17 00:00:00 2001 From: "ben.gould" Date: Wed, 11 Dec 2024 16:00:30 -0500 Subject: [PATCH 8/8] updated to reflect testing date time stamps --- .../main/java/org/gitlab4j/api/webhook/EventMergeRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java index 461390fdb..7eff4ed62 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java @@ -134,7 +134,7 @@ public class EventMergeRequest { private Long mergeUserId; @JsonProperty("deleted_at") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date deletedAt; @JsonProperty("in_progress_merge_commit_sha") @@ -144,7 +144,7 @@ public class EventMergeRequest { private Integer lockVersion; @JsonProperty("last_edited_at") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z") private Date lastEditedAt; @JsonProperty("last_edited_by_id")