(
this, Package.class, itemsPerPage, query, "projects", getProjectIdOrPath(projectIdOrPath), "packages"));
}
diff --git a/src/main/java/org/gitlab4j/api/Pager.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/Pager.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/Pager.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/Pager.java
index ac5414b20..563b6fa5b 100644
--- a/src/main/java/org/gitlab4j/api/Pager.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/Pager.java
@@ -13,6 +13,7 @@
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/src/main/java/org/gitlab4j/api/PagerSpliterator.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/PagerSpliterator.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/PagerSpliterator.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/PagerSpliterator.java
diff --git a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
index 13e92cb48..c17ea67c9 100644
--- a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
@@ -5,7 +5,7 @@
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.models.PersonalAccessToken;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.utils.ISO8601;
/**
* This class provides an entry point to all the GitLab API personal access token calls.
diff --git a/src/main/java/org/gitlab4j/api/PipelineApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/PipelineApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/PipelineApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/PipelineApi.java
index 30182dcc0..6bb2878bf 100644
--- a/src/main/java/org/gitlab4j/api/PipelineApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/PipelineApi.java
@@ -16,6 +16,7 @@
import org.gitlab4j.api.models.PipelineStatus;
import org.gitlab4j.api.models.Trigger;
import org.gitlab4j.api.models.Variable;
+import org.gitlab4j.models.Constants;
/**
* This class provides an entry point to all the GitLab API pipeline related calls.
@@ -126,7 +127,7 @@ public List getPipelines(Object projectIdOrPath, PipelineFilter filter
*/
public Pager getPipelines(Object projectIdOrPath, PipelineFilter filter, int itemsPerPage)
throws GitLabApiException {
- GitLabApiForm formData = (filter != null ? filter.getQueryParams() : new GitLabApiForm());
+ GitLabApiForm formData = (filter != null ? new GitLabApiForm(filter.getQueryParams()) : new GitLabApiForm());
return (new Pager(
this,
Pipeline.class,
diff --git a/src/main/java/org/gitlab4j/api/ProjectApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/ProjectApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java
index 0c420e884..84d399e2f 100644
--- a/src/main/java/org/gitlab4j/api/ProjectApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java
@@ -70,7 +70,8 @@
import org.gitlab4j.api.models.UploadedFile;
import org.gitlab4j.api.models.Variable;
import org.gitlab4j.api.models.Visibility;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.utils.ISO8601;
/**
* This class provides an entry point to all the GitLab API project calls.
@@ -652,7 +653,7 @@ public List getProjects(ProjectFilter filter) throws GitLabApiException
* @throws GitLabApiException if any exception occurs
*/
public List getProjects(ProjectFilter filter, int page, int perPage) throws GitLabApiException {
- GitLabApiForm formData = filter.getQueryParams(page, perPage);
+ GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams(page, perPage));
Response response = get(Response.Status.OK, formData.asMap(), "projects");
return (response.readEntity(new GenericType>() {}));
}
@@ -668,7 +669,7 @@ public List getProjects(ProjectFilter filter, int page, int perPage) th
* @throws GitLabApiException if any exception occurs
*/
public Pager getProjects(ProjectFilter filter, int itemsPerPage) throws GitLabApiException {
- GitLabApiForm formData = filter.getQueryParams();
+ GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams());
return (new Pager(this, Project.class, itemsPerPage, formData.asMap(), "projects"));
}
@@ -713,7 +714,7 @@ public List getUserProjects(Object userIdOrUsername, ProjectFilter filt
*/
public List getUserProjects(Object userIdOrUsername, ProjectFilter filter, int page, int perPage)
throws GitLabApiException {
- GitLabApiForm formData = filter.getQueryParams(page, perPage);
+ GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams(page, perPage));
Response response =
get(Response.Status.OK, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "projects");
return (response.readEntity(new GenericType>() {}));
@@ -732,7 +733,7 @@ public List getUserProjects(Object userIdOrUsername, ProjectFilter filt
*/
public Pager getUserProjects(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage)
throws GitLabApiException {
- GitLabApiForm formData = filter.getQueryParams();
+ GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams());
return (new Pager(
this,
Project.class,
@@ -2253,7 +2254,7 @@ public List getProjectGroups(Object projectIdOrPath, ProjectGroups
*/
public Pager getProjectGroups(Object projectIdOrPath, ProjectGroupsFilter filter, int itemsPerPage)
throws GitLabApiException {
- GitLabApiForm formData = filter.getQueryParams();
+ GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams());
return (new Pager(
this,
ProjectGroup.class,
@@ -4112,7 +4113,7 @@ public ProjectApprovalsConfig getApprovalsConfiguration(Object projectIdOrPath)
*/
public ProjectApprovalsConfig setApprovalsConfiguration(Object projectIdOrPath, ProjectApprovalsConfig config)
throws GitLabApiException {
- GitLabApiForm formData = config.getForm();
+ GitLabApiForm formData = new GitLabApiForm(config.getForm());
Response response =
post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "approvals");
return (response.readEntity(ProjectApprovalsConfig.class));
@@ -4182,7 +4183,7 @@ public Stream getApprovalRulesStream(Object projectIdOrPath) throw
*/
public ApprovalRule createApprovalRule(Object projectIdOrPath, ApprovalRuleParams params)
throws GitLabApiException {
- GitLabApiForm formData = params.getForm();
+ GitLabApiForm formData = new GitLabApiForm(params.getForm());
Response response =
post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "approval_rules");
return (response.readEntity(ApprovalRule.class));
@@ -4207,7 +4208,7 @@ public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long approvalRule
throw new RuntimeException("approvalRuleId cannot be null");
}
- GitLabApiForm formData = params.getForm();
+ GitLabApiForm formData = new GitLabApiForm(params.getForm());
Response response = putWithFormData(
Response.Status.OK,
formData,
@@ -4639,7 +4640,7 @@ public void revokeProjectAccessToken(Object projectIdOrPath, Long tokenId) throw
public List listProjectIterations(Object projectIdOrPath, IterationFilter filter)
throws GitLabApiException {
MultivaluedMap queryParams =
- (filter == null) ? null : filter.getQueryParams().asMap();
+ (filter == null) ? null : new GitLabApiForm(filter.getQueryParams()).asMap();
Response response =
get(Response.Status.OK, queryParams, "projects", getProjectIdOrPath(projectIdOrPath), "iterations");
return (response.readEntity(new GenericType>() {}));
diff --git a/src/main/java/org/gitlab4j/api/ProjectLicense.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectLicense.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ProjectLicense.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectLicense.java
diff --git a/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
index 486e88bf8..5f877b546 100644
--- a/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
@@ -10,6 +10,7 @@
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.models.AllowedTo;
import org.gitlab4j.api.models.ProtectedBranch;
+import org.gitlab4j.models.GitLabForm;
/**
* This class provides an entry point to all the Protected Branches API calls.
@@ -334,7 +335,7 @@ public ProtectedBranch protectBranch(
Boolean codeOwnerApprovalRequired)
throws GitLabApiException {
- GitLabApiForm formData = new GitLabApiForm()
+ GitLabForm formData = new GitLabForm()
.withParam("name", branchName, true)
.withParam("code_owner_approval_required", codeOwnerApprovalRequired);
@@ -344,7 +345,7 @@ public ProtectedBranch protectBranch(
Response response = post(
Response.Status.CREATED,
- formData.asMap(),
+ new GitLabApiForm(formData).asMap(),
"projects",
getProjectIdOrPath(projectIdOrPath),
"protected_branches");
diff --git a/src/main/java/org/gitlab4j/api/ProxyClientConfig.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProxyClientConfig.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ProxyClientConfig.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ProxyClientConfig.java
diff --git a/src/main/java/org/gitlab4j/api/ReleaseLinksApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ReleaseLinksApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ReleaseLinksApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ReleaseLinksApi.java
diff --git a/src/main/java/org/gitlab4j/api/ReleasesApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ReleasesApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ReleasesApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ReleasesApi.java
diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/RepositoryApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryApi.java
index 8070c4236..6e455d27f 100644
--- a/src/main/java/org/gitlab4j/api/RepositoryApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryApi.java
@@ -543,7 +543,7 @@ public InputStream getRepositoryArchive(Object projectIdOrPath, String sha) thro
*/
public InputStream getRepositoryArchive(Object projectIdOrPath, RepositoryArchiveParams params)
throws GitLabApiException {
- GitLabApiForm formData = params.getForm();
+ GitLabApiForm formData = new GitLabApiForm(params.getForm());
Response response = getWithAccepts(
Response.Status.OK,
formData.asMap(),
@@ -655,7 +655,7 @@ public InputStream getRepositoryArchive(
* Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/45992
* https://gitlab.com/gitlab-com/support-forum/issues/3067
*/
- Form formData = params.getForm();
+ Form formData = new GitLabApiForm(params.getForm());
Response response = getWithAccepts(
Response.Status.OK,
formData.asMap(),
@@ -724,7 +724,7 @@ public File getRepositoryArchive(Object projectIdOrPath, String sha, File direct
public File getRepositoryArchive(Object projectIdOrPath, RepositoryArchiveParams params, File directory)
throws GitLabApiException {
- Form formData = params.getForm();
+ Form formData = new GitLabApiForm(params.getForm());
Response response = getWithAccepts(
Response.Status.OK,
formData.asMap(),
@@ -874,7 +874,7 @@ public File getRepositoryArchive(
* Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/45992
* https://gitlab.com/gitlab-com/support-forum/issues/3067
*/
- Form formData = params.getForm();
+ Form formData = new GitLabApiForm(params.getForm());
Response response = getWithAccepts(
Response.Status.OK,
formData.asMap(),
diff --git a/src/main/java/org/gitlab4j/api/RepositoryFileApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryFileApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/RepositoryFileApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryFileApi.java
index ed35689e5..21fcb7be6 100644
--- a/src/main/java/org/gitlab4j/api/RepositoryFileApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/RepositoryFileApi.java
@@ -17,6 +17,7 @@
import org.gitlab4j.api.models.Blame;
import org.gitlab4j.api.models.RepositoryFile;
import org.gitlab4j.api.models.RepositoryFileResponse;
+import org.gitlab4j.models.Constants;
/**
* This class provides an entry point to all the GitLab API repository files calls.
diff --git a/src/main/java/org/gitlab4j/api/RepositorySubmodulesApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/RepositorySubmodulesApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/RepositorySubmodulesApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/RepositorySubmodulesApi.java
diff --git a/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java
diff --git a/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java
diff --git a/src/main/java/org/gitlab4j/api/RunnersApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/RunnersApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/RunnersApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/RunnersApi.java
diff --git a/src/main/java/org/gitlab4j/api/SearchApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/SearchApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/SearchApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/SearchApi.java
diff --git a/src/main/java/org/gitlab4j/api/ServicesApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ServicesApi.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/ServicesApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/ServicesApi.java
index 725916027..538360eb7 100644
--- a/src/main/java/org/gitlab4j/api/ServicesApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/ServicesApi.java
@@ -107,7 +107,7 @@ public HipChatService getHipChatService(Object projectIdOrPath) throws GitLabApi
*/
public HipChatService updateHipChatService(Object projectIdOrPath, HipChatService hipChat)
throws GitLabApiException {
- GitLabApiForm formData = hipChat.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(hipChat.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -224,7 +224,7 @@ public SlackService getSlackService(Object projectIdOrPath) throws GitLabApiExce
*/
public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications)
throws GitLabApiException {
- GitLabApiForm formData = slackNotifications.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(slackNotifications.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -286,7 +286,7 @@ public JiraService getJiraService(Object projectIdOrPath) throws GitLabApiExcept
* @throws GitLabApiException if any exception occurs
*/
public JiraService updateJiraService(Object projectIdOrPath, JiraService jira) throws GitLabApiException {
- GitLabApiForm formData = jira.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(jira.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -342,7 +342,7 @@ public ExternalWikiService getExternalWikiService(Object projectIdOrPath) throws
*/
public ExternalWikiService updateExternalWikiService(Object projectIdOrPath, ExternalWikiService externalWiki)
throws GitLabApiException {
- GitLabApiForm formData = externalWiki.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(externalWiki.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -420,7 +420,7 @@ public MattermostService getMattermostService(Object projectIdOrPath) throws Git
*/
public MattermostService updateMattermostService(Object projectIdOrPath, MattermostService mattermostNotifications)
throws GitLabApiException {
- GitLabApiForm formData = mattermostNotifications.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(mattermostNotifications.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -482,7 +482,7 @@ public BugzillaService getBugzillaService(Object projectIdOrPath) throws GitLabA
*/
public BugzillaService updateBugzillaService(Object projectIdOrPath, BugzillaService bugzillaService)
throws GitLabApiException {
- GitLabApiForm formData = bugzillaService.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(bugzillaService.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -547,7 +547,7 @@ public CustomIssueTrackerService getCustomIssueTrackerService(Object projectIdOr
*/
public CustomIssueTrackerService updateCustomIssueTrackerService(
Object projectIdOrPath, CustomIssueTrackerService customIssueTracker) throws GitLabApiException {
- GitLabApiForm formData = customIssueTracker.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(customIssueTracker.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
@@ -620,7 +620,7 @@ public EmailOnPushService getEmailOnPushService(Object projectIdOrPath) throws G
*/
public EmailOnPushService updateEmailOnPushService(Object projectIdOrPath, EmailOnPushService emailsOnPush)
throws GitLabApiException {
- GitLabApiForm formData = emailsOnPush.servicePropertiesForm();
+ GitLabApiForm formData = new GitLabApiForm(emailsOnPush.servicePropertiesForm());
Response response = put(
Response.Status.OK,
formData.asMap(),
diff --git a/src/main/java/org/gitlab4j/api/SnippetsApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/SnippetsApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/SnippetsApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/SnippetsApi.java
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/SystemHookManager.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/SystemHookManager.java
index 65f26cc30..4e59b5c47 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/SystemHookManager.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api.systemhooks;
+package org.gitlab4j.api;
import java.io.InputStreamReader;
import java.util.List;
@@ -8,8 +8,18 @@
import jakarta.servlet.http.HttpServletRequest;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.HookManager;
+import org.gitlab4j.api.systemhooks.GroupMemberSystemHookEvent;
+import org.gitlab4j.api.systemhooks.GroupSystemHookEvent;
+import org.gitlab4j.api.systemhooks.KeySystemHookEvent;
+import org.gitlab4j.api.systemhooks.MergeRequestSystemHookEvent;
+import org.gitlab4j.api.systemhooks.ProjectSystemHookEvent;
+import org.gitlab4j.api.systemhooks.PushSystemHookEvent;
+import org.gitlab4j.api.systemhooks.RepositorySystemHookEvent;
+import org.gitlab4j.api.systemhooks.SystemHookEvent;
+import org.gitlab4j.api.systemhooks.SystemHookListener;
+import org.gitlab4j.api.systemhooks.TagPushSystemHookEvent;
+import org.gitlab4j.api.systemhooks.TeamMemberSystemHookEvent;
+import org.gitlab4j.api.systemhooks.UserSystemHookEvent;
import org.gitlab4j.api.utils.HttpRequestUtils;
import org.gitlab4j.api.utils.JacksonJson;
diff --git a/src/main/java/org/gitlab4j/api/SystemHooksApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/SystemHooksApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/SystemHooksApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/SystemHooksApi.java
diff --git a/src/main/java/org/gitlab4j/api/TagsApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/TagsApi.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/TagsApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/TagsApi.java
index 3cf546cb1..2c33def78 100644
--- a/src/main/java/org/gitlab4j/api/TagsApi.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/TagsApi.java
@@ -15,7 +15,7 @@
import org.gitlab4j.api.models.ProtectedTag;
import org.gitlab4j.api.models.Release;
import org.gitlab4j.api.models.Tag;
-import org.gitlab4j.api.utils.FileUtils;
+import org.gitlab4j.models.utils.FileUtils;
/**
* This class provides an entry point to all the GitLab Tags and Protected Tags API calls.
diff --git a/src/main/java/org/gitlab4j/api/TodosApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/TodosApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/TodosApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/TodosApi.java
diff --git a/src/main/java/org/gitlab4j/api/TopicsApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/TopicsApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/TopicsApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/TopicsApi.java
diff --git a/src/main/java/org/gitlab4j/api/UserApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/UserApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/UserApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/UserApi.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/WebHookManager.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/WebHookManager.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/webhook/WebHookManager.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/WebHookManager.java
index 3745baf27..27439e350 100644
--- a/src/main/java/org/gitlab4j/api/webhook/WebHookManager.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/WebHookManager.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api.webhook;
+package org.gitlab4j.api;
import java.io.InputStreamReader;
import java.util.List;
@@ -8,10 +8,21 @@
import jakarta.servlet.http.HttpServletRequest;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.HookManager;
import org.gitlab4j.api.utils.HttpRequestUtils;
import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.api.webhook.BuildEvent;
+import org.gitlab4j.api.webhook.DeploymentEvent;
+import org.gitlab4j.api.webhook.Event;
+import org.gitlab4j.api.webhook.IssueEvent;
+import org.gitlab4j.api.webhook.JobEvent;
+import org.gitlab4j.api.webhook.MergeRequestEvent;
+import org.gitlab4j.api.webhook.NoteEvent;
+import org.gitlab4j.api.webhook.PipelineEvent;
+import org.gitlab4j.api.webhook.PushEvent;
+import org.gitlab4j.api.webhook.ReleaseEvent;
+import org.gitlab4j.api.webhook.TagPushEvent;
+import org.gitlab4j.api.webhook.WebHookListener;
+import org.gitlab4j.api.webhook.WikiPageEvent;
/**
* This class provides a handler for processing GitLab WebHook callouts.
diff --git a/src/main/java/org/gitlab4j/api/WikisApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/WikisApi.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/WikisApi.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/WikisApi.java
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java
new file mode 100644
index 000000000..ea79745a7
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java
@@ -0,0 +1,9 @@
+package org.gitlab4j.api.systemhooks;
+
+import org.gitlab4j.api.HookManager;
+
+/**
+ * @deprecated use {@link org.gitlab4j.api.SystemHookManager} instead
+ */
+@Deprecated
+public class SystemHookManager extends org.gitlab4j.api.SystemHookManager implements HookManager {}
diff --git a/src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java
index 076fc7f09..e482ce741 100644
--- a/src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/AccessTokenUtils.java
@@ -15,6 +15,7 @@
import java.util.regex.Pattern;
import org.gitlab4j.api.GitLabApiException;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/DurationUtils.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/DurationUtils.java
new file mode 100644
index 000000000..6f5e7295d
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/DurationUtils.java
@@ -0,0 +1,7 @@
+package org.gitlab4j.api.utils;
+
+/**
+ * @deprecated use {@link org.gitlab4j.models.utils.DurationUtils} instead
+ */
+@Deprecated
+public class DurationUtils extends org.gitlab4j.models.utils.DurationUtils {}
diff --git a/src/main/java/org/gitlab4j/api/utils/EmailChecker.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/EmailChecker.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/utils/EmailChecker.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/EmailChecker.java
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/FileUtils.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/FileUtils.java
new file mode 100644
index 000000000..a389634d4
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/FileUtils.java
@@ -0,0 +1,24 @@
+package org.gitlab4j.api.utils;
+
+import jakarta.ws.rs.core.Response;
+
+/**
+ * This class provides static utility methods used throughout GitLab4J.
+ */
+public class FileUtils {
+
+ /**
+ * Get the filename from the "Content-Disposition" header of a JAX-RS response.
+ *
+ * @param response the JAX-RS Response instance to get the "Content-Disposition" header filename from
+ * @return the filename from the "Content-Disposition" header of a JAX-RS response, or null
+ * if the "Content-Disposition" header is not present in the response
+ */
+ public static String getFilenameFromContentDisposition(Response response) {
+
+ String disposition = response.getHeaderString("Content-Disposition");
+ if (disposition == null || disposition.trim().length() == 0) return (null);
+
+ return (disposition.replaceFirst("(?i)^.*filename=\"([^\"]+)\".*$", "$1"));
+ }
+}
diff --git a/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
index ffb215250..28f70f9d9 100644
--- a/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
@@ -8,6 +8,8 @@
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
+import org.gitlab4j.models.utils.ISO8601;
+
public class HttpRequestUtils {
/**
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/ISO8601.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/ISO8601.java
new file mode 100644
index 000000000..2079e18c7
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/ISO8601.java
@@ -0,0 +1,7 @@
+package org.gitlab4j.api.utils;
+
+/**
+ * @deprecated use {@link org.gitlab4j.models.utils.ISO8601} instead
+ */
+@Deprecated
+public class ISO8601 extends org.gitlab4j.models.utils.ISO8601 {}
diff --git a/src/main/java/org/gitlab4j/api/utils/JacksonJson.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJson.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/utils/JacksonJson.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJson.java
index 4daffbe03..f4bdc89df 100644
--- a/src/main/java/org/gitlab4j/api/utils/JacksonJson.java
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJson.java
@@ -15,6 +15,7 @@
import jakarta.ws.rs.ext.ContextResolver;
import org.gitlab4j.api.models.User;
+import org.gitlab4j.models.utils.ISO8601;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJsonEnumHelper.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJsonEnumHelper.java
new file mode 100644
index 000000000..6bfc14517
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJsonEnumHelper.java
@@ -0,0 +1,24 @@
+package org.gitlab4j.api.utils;
+
+/**
+ * @deprecated use {@link org.gitlab4j.models.utils.JacksonJsonEnumHelper} instead
+ */
+@Deprecated
+public class JacksonJsonEnumHelper> extends org.gitlab4j.models.utils.JacksonJsonEnumHelper {
+ public JacksonJsonEnumHelper(Class enumType) {
+ super(enumType, false);
+ }
+
+ public JacksonJsonEnumHelper(Class enumType, boolean firstLetterCapitalized) {
+ super(enumType, firstLetterCapitalized);
+ }
+
+ public JacksonJsonEnumHelper(Class enumType, boolean firstLetterCapitalized, boolean camelCased) {
+ super(enumType, firstLetterCapitalized, camelCased, false);
+ }
+
+ public JacksonJsonEnumHelper(
+ Class enumType, boolean firstLetterCapitalized, boolean camelCased, boolean preserveUnderscores) {
+ super(enumType, firstLetterCapitalized, camelCased, preserveUnderscores);
+ }
+}
diff --git a/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
diff --git a/src/main/java/org/gitlab4j/api/utils/Oauth2LoginStreamingOutput.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/Oauth2LoginStreamingOutput.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/utils/Oauth2LoginStreamingOutput.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/Oauth2LoginStreamingOutput.java
diff --git a/src/main/java/org/gitlab4j/api/utils/SecretString.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/SecretString.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/utils/SecretString.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/SecretString.java
diff --git a/src/main/java/org/gitlab4j/api/utils/UrlEncoder.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/utils/UrlEncoder.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/utils/UrlEncoder.java
rename to gitlab4j-api/src/main/java/org/gitlab4j/api/utils/UrlEncoder.java
diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/webhook/WebHookManager.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/webhook/WebHookManager.java
new file mode 100644
index 000000000..2201ace3d
--- /dev/null
+++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/webhook/WebHookManager.java
@@ -0,0 +1,9 @@
+package org.gitlab4j.api.webhook;
+
+import org.gitlab4j.api.HookManager;
+
+/**
+ * @deprecated use {@link org.gitlab4j.api.WebHookManager} instead
+ */
+@Deprecated
+public class WebHookManager extends org.gitlab4j.api.WebHookManager implements HookManager {}
diff --git a/src/test/java/org/gitlab4j/api/AbstractIntegrationTest.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/AbstractIntegrationTest.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/AbstractIntegrationTest.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/AbstractIntegrationTest.java
diff --git a/src/test/java/org/gitlab4j/api/HelperUtils.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/HelperUtils.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/HelperUtils.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/HelperUtils.java
diff --git a/src/test/java/org/gitlab4j/api/JsonUtils.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/JsonUtils.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/JsonUtils.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/JsonUtils.java
diff --git a/src/test/java/org/gitlab4j/api/MockResponse.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/MockResponse.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/MockResponse.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/MockResponse.java
index 87451a8de..4ee85420d 100644
--- a/src/test/java/org/gitlab4j/api/MockResponse.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/MockResponse.java
@@ -18,6 +18,8 @@
import jakarta.ws.rs.core.NewCookie;
import jakarta.ws.rs.core.Response;
+import org.gitlab4j.models.Constants;
+
/**
* This class can be used as a concrete mock to test the individual APIs
* getXxxxx() methods without the need to have a GitLab server available.
diff --git a/src/test/java/org/gitlab4j/api/MockServletInputStream.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/MockServletInputStream.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/MockServletInputStream.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/MockServletInputStream.java
diff --git a/src/test/java/org/gitlab4j/api/PagerSpliteratorTest.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/PagerSpliteratorTest.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/PagerSpliteratorTest.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/PagerSpliteratorTest.java
diff --git a/src/test/java/org/gitlab4j/api/PropertyConstants.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/PropertyConstants.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/PropertyConstants.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/PropertyConstants.java
diff --git a/src/test/java/org/gitlab4j/api/SetupIntegrationTestExtension.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/SetupIntegrationTestExtension.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/SetupIntegrationTestExtension.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/SetupIntegrationTestExtension.java
diff --git a/src/test/java/org/gitlab4j/api/TestAccessToken.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestAccessToken.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestAccessToken.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestAccessToken.java
index cdf334a98..ae74e7281 100644
--- a/src/test/java/org/gitlab4j/api/TestAccessToken.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestAccessToken.java
@@ -3,9 +3,9 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
-import org.gitlab4j.api.Constants.TokenType;
import org.gitlab4j.api.GitLabApi.ApiVersion;
import org.gitlab4j.api.models.Version;
+import org.gitlab4j.models.Constants.TokenType;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestAccessTokenUtils.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestAccessTokenUtils.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestAccessTokenUtils.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestAccessTokenUtils.java
diff --git a/src/test/java/org/gitlab4j/api/TestApplicationSettingsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestApplicationSettingsApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestApplicationSettingsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestApplicationSettingsApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestApplicationsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestApplicationsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestApplicationsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestApplicationsApi.java
index fb6f49767..b08d46402 100644
--- a/src/test/java/org/gitlab4j/api/TestApplicationsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestApplicationsApi.java
@@ -30,8 +30,8 @@
import java.util.List;
-import org.gitlab4j.api.Constants.ApplicationScope;
import org.gitlab4j.api.models.Application;
+import org.gitlab4j.models.Constants.ApplicationScope;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestAvatarUpload.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestAvatarUpload.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestAvatarUpload.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestAvatarUpload.java
diff --git a/src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java
index f58c6996f..5fe468875 100644
--- a/src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java
@@ -14,6 +14,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestCommitsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitsApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestCommitsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitsApi.java
index 3b4f964ca..dc8db1add 100644
--- a/src/test/java/org/gitlab4j/api/TestCommitsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestCommitsApi.java
@@ -27,7 +27,7 @@
import org.gitlab4j.api.models.Diff;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.RepositoryFile;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.utils.ISO8601;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
diff --git a/src/test/java/org/gitlab4j/api/TestDeployKeysApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeployKeysApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestDeployKeysApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeployKeysApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestDeployTokensApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeployTokensApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestDeployTokensApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeployTokensApi.java
index f70614135..a650d9e26 100644
--- a/src/test/java/org/gitlab4j/api/TestDeployTokensApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeployTokensApi.java
@@ -13,10 +13,10 @@
import java.util.List;
import java.util.Optional;
-import org.gitlab4j.api.Constants.DeployTokenScope;
import org.gitlab4j.api.models.DeployToken;
import org.gitlab4j.api.models.Group;
import org.gitlab4j.api.models.Project;
+import org.gitlab4j.models.Constants.DeployTokenScope;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestDeploymentsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java
index 7e7604858..f412cf11e 100644
--- a/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java
@@ -10,11 +10,11 @@
import java.util.Optional;
import java.util.stream.Stream;
-import org.gitlab4j.api.Constants.DeploymentStatus;
import org.gitlab4j.api.models.Commit;
import org.gitlab4j.api.models.Deployment;
import org.gitlab4j.api.models.DeploymentFilter;
import org.gitlab4j.api.models.Project;
+import org.gitlab4j.models.Constants.DeploymentStatus;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestEmailChecker.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEmailChecker.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestEmailChecker.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestEmailChecker.java
diff --git a/src/test/java/org/gitlab4j/api/TestEnvironmentsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEnvironmentsApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestEnvironmentsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestEnvironmentsApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java
index 4ccb7fb31..649f2290c 100644
--- a/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java
@@ -14,6 +14,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestEventsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEventsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestEventsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestEventsApi.java
index 39071941d..ae9a4946d 100644
--- a/src/test/java/org/gitlab4j/api/TestEventsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestEventsApi.java
@@ -11,7 +11,8 @@
import org.gitlab4j.api.models.Event;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.User;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.utils.ISO8601;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java
index 281972ece..11e73e33b 100644
--- a/src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java
@@ -16,6 +16,7 @@
import org.gitlab4j.api.models.ExternalStatusCheck;
import org.gitlab4j.api.models.ExternalStatusCheckStatus;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestGitLabApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGitLabApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApi.java
diff --git a/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
new file mode 100644
index 000000000..d93445796
--- /dev/null
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
@@ -0,0 +1,43 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Greg Messner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software.json"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package org.gitlab4j.api;
+
+import static org.gitlab4j.api.JsonUtils.compareJson;
+import static org.gitlab4j.api.JsonUtils.readTreeFromResource;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.gitlab4j.api.models.ApplicationSettings;
+import org.junit.jupiter.api.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+public class TestGitLabApiBeans {
+
+ @Test
+ public void testSettings() throws Exception {
+ JsonNode json = readTreeFromResource("application-settings.json");
+ ApplicationSettings applicationSettings = ApplicationSettingsApi.parseApplicationSettings(json);
+ assertTrue(compareJson(applicationSettings.getSettings(), "application-settings.json"));
+ }
+}
diff --git a/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiEvents.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiEvents.java
new file mode 100644
index 000000000..2bc6330eb
--- /dev/null
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiEvents.java
@@ -0,0 +1,78 @@
+package org.gitlab4j.api;
+
+import static org.gitlab4j.api.JsonUtils.compareJson;
+import static org.gitlab4j.api.JsonUtils.readTreeFromResource;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+import java.util.logging.Level;
+
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.http.HttpServletRequest;
+
+import org.gitlab4j.api.systemhooks.MergeRequestSystemHookEvent;
+import org.gitlab4j.api.systemhooks.SystemHookEvent;
+import org.gitlab4j.api.systemhooks.SystemHookListener;
+import org.gitlab4j.api.utils.JacksonJson;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+public class TestGitLabApiEvents {
+
+ private static JacksonJson jacksonJson;
+ private static Level savedLevel;
+
+ public TestGitLabApiEvents() {
+ super();
+ }
+
+ @BeforeAll
+ public static void setup() throws Exception {
+ jacksonJson = new JacksonJson();
+ jacksonJson.getObjectMapper().configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
+ savedLevel = GitLabApi.getLogger().getLevel();
+ }
+
+ @AfterAll
+ public static void teardown() {
+ GitLabApi.getLogger().setLevel(savedLevel);
+ }
+
+ @Test
+ public void testSystemHookManagerHandleEvent() throws Exception {
+
+ // Arrange
+ HttpServletRequest request = mock(HttpServletRequest.class);
+ given(request.getHeader("X-Gitlab-Event")).willReturn(SystemHookManager.SYSTEM_HOOK_EVENT);
+
+ JsonNode tree = readTreeFromResource("merge-request-system-hook-event.json");
+ ((ObjectNode) tree).remove("event_name");
+ String json = jacksonJson.getObjectMapper().writeValueAsString(tree);
+ ServletInputStream servletInputStream = new MockServletInputStream(json);
+ given(request.getInputStream()).willReturn(servletInputStream);
+
+ SystemHookManager systemHookMgr = new SystemHookManager();
+ final SystemHookEvent receivedEvents[] = new SystemHookEvent[1];
+ systemHookMgr.addListener(new SystemHookListener() {
+ public void onMergeRequestEvent(MergeRequestSystemHookEvent event) {
+ receivedEvents[0] = event;
+ }
+ });
+
+ // Act
+ systemHookMgr.handleEvent(request);
+
+ // Assert
+ assertNotNull(receivedEvents[0]);
+ assertEquals(MergeRequestSystemHookEvent.class, receivedEvents[0].getClass());
+ assertTrue(compareJson(receivedEvents[0], "merge-request-system-hook-event.json"));
+ }
+}
diff --git a/src/test/java/org/gitlab4j/api/TestGitLabApiException.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiException.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGitLabApiException.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabApiException.java
diff --git a/src/test/java/org/gitlab4j/api/TestGitLabCiYamlApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabCiYamlApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGitLabCiYamlApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabCiYamlApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestGitLabLogin.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabLogin.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGitLabLogin.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGitLabLogin.java
diff --git a/src/test/java/org/gitlab4j/api/TestGroupApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGroupApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGroupApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGroupApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestGroupCustomAttributes.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestGroupCustomAttributes.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestGroupCustomAttributes.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestGroupCustomAttributes.java
diff --git a/src/test/java/org/gitlab4j/api/TestHealthCheckApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestHealthCheckApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestHealthCheckApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestHealthCheckApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestIgnoreCertificateErrors.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestIgnoreCertificateErrors.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestIgnoreCertificateErrors.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestIgnoreCertificateErrors.java
diff --git a/src/test/java/org/gitlab4j/api/TestImportExportApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestImportExportApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestImportExportApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestImportExportApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java
index f93f4a618..b5db273f1 100644
--- a/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java
@@ -14,6 +14,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestIssuesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssuesApi.java
similarity index 97%
rename from src/test/java/org/gitlab4j/api/TestIssuesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssuesApi.java
index 86e8ba17d..2a320bc87 100644
--- a/src/test/java/org/gitlab4j/api/TestIssuesApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestIssuesApi.java
@@ -37,13 +37,13 @@
import jakarta.ws.rs.core.Response;
-import org.gitlab4j.api.Constants.IssueState;
import org.gitlab4j.api.models.Duration;
import org.gitlab4j.api.models.Group;
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.IssueFilter;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.TimeStats;
+import org.gitlab4j.models.Constants.IssueState;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
@@ -268,8 +268,8 @@ public void testGetTimeTrackingStats() throws GitLabApiException {
Issue issue = ensureIssue();
TimeStats timeStats = gitLabApi.getIssuesApi().getTimeTrackingStats(issue.getProjectId(), issue.getIid());
- assertEquals(new Integer(0), timeStats.getTimeEstimate());
- assertEquals(new Integer(0), timeStats.getTotalTimeSpent());
+ assertEquals(Integer.valueOf(0), timeStats.getTimeEstimate());
+ assertEquals(Integer.valueOf(0), timeStats.getTotalTimeSpent());
}
/**
@@ -280,8 +280,8 @@ public void testGetTimeTrackingStats() throws GitLabApiException {
* @param totalTimeSpent
*/
private void assertTimeStats(TimeStats timeStats, int timeEstimate, int totalTimeSpent) {
- assertEquals(new Integer(timeEstimate), timeStats.getTimeEstimate());
- assertEquals(new Integer(totalTimeSpent), timeStats.getTotalTimeSpent());
+ assertEquals(Integer.valueOf(timeEstimate), timeStats.getTimeEstimate());
+ assertEquals(Integer.valueOf(totalTimeSpent), timeStats.getTotalTimeSpent());
}
@Test
diff --git a/src/test/java/org/gitlab4j/api/TestJobApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestJobApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestJobApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestJobApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestLabelsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestLabelsApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestLabelsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestLabelsApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestMarkdownApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMarkdownApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestMarkdownApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestMarkdownApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestMergeRequestApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestMergeRequestApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestApi.java
index a25154c35..410e10fcf 100644
--- a/src/test/java/org/gitlab4j/api/TestMergeRequestApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestApi.java
@@ -12,7 +12,6 @@
import java.util.Optional;
import java.util.stream.Stream;
-import org.gitlab4j.api.Constants.MergeRequestSearchIn;
import org.gitlab4j.api.models.Branch;
import org.gitlab4j.api.models.MergeRequest;
import org.gitlab4j.api.models.MergeRequestFilter;
@@ -21,6 +20,7 @@
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.RepositoryFile;
import org.gitlab4j.api.models.User;
+import org.gitlab4j.models.Constants.MergeRequestSearchIn;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java
index 85866805c..233bb9d32 100644
--- a/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java
@@ -14,6 +14,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestMetadataApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestMetadataApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestMetadataApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestMetadataApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestNamespaceApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestNamespaceApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestNamespaceApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestNamespaceApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestNotesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestNotesApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestNotesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestNotesApi.java
index 6e56231c9..3b2ad00b7 100644
--- a/src/test/java/org/gitlab4j/api/TestNotesApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestNotesApi.java
@@ -5,11 +5,11 @@
import java.util.List;
-import org.gitlab4j.api.Constants.SortOrder;
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.MergeRequest;
import org.gitlab4j.api.models.Note;
import org.gitlab4j.api.models.Project;
+import org.gitlab4j.models.Constants.SortOrder;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
diff --git a/src/test/java/org/gitlab4j/api/TestNotificationSettingsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestNotificationSettingsApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestNotificationSettingsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestNotificationSettingsApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestOauth2LoginStreamingOutput.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestOauth2LoginStreamingOutput.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestOauth2LoginStreamingOutput.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestOauth2LoginStreamingOutput.java
diff --git a/src/test/java/org/gitlab4j/api/TestPackageApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestPackageApi.java
similarity index 97%
rename from src/test/java/org/gitlab4j/api/TestPackageApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestPackageApi.java
index a3f7459c0..a8d8a74cb 100644
--- a/src/test/java/org/gitlab4j/api/TestPackageApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestPackageApi.java
@@ -7,6 +7,7 @@
import org.gitlab4j.api.models.*;
import org.gitlab4j.api.models.Package;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
diff --git a/src/test/java/org/gitlab4j/api/TestPager.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestPager.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestPager.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestPager.java
diff --git a/src/test/java/org/gitlab4j/api/TestPipelineApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestPipelineApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestPipelineApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestPipelineApi.java
index 4ef6a6984..af681133d 100644
--- a/src/test/java/org/gitlab4j/api/TestPipelineApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestPipelineApi.java
@@ -24,6 +24,7 @@
import org.gitlab4j.api.models.RepositoryFileResponse;
import org.gitlab4j.api.models.Trigger;
import org.gitlab4j.api.models.Variable;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.extension.ExtendWith;
diff --git a/src/test/java/org/gitlab4j/api/TestProjectApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestProjectApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectApi.java
index 086a4a48d..c693a9451 100644
--- a/src/test/java/org/gitlab4j/api/TestProjectApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectApi.java
@@ -56,6 +56,7 @@
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.models.Variable;
import org.gitlab4j.api.models.Visibility;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java
diff --git a/src/test/java/org/gitlab4j/api/TestProjectCustomAttributes.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectCustomAttributes.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestProjectCustomAttributes.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestProjectCustomAttributes.java
diff --git a/src/test/java/org/gitlab4j/api/TestProtectedBranchesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestProtectedBranchesApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestProtectedBranchesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestProtectedBranchesApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java
index f292b3d4b..e3cc8a3f4 100644
--- a/src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java
@@ -15,6 +15,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Link;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestReleasesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestReleasesApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestReleasesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestReleasesApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestRepositoryApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositoryApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestRepositoryApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositoryApi.java
index 8ead3709e..985354342 100644
--- a/src/test/java/org/gitlab4j/api/TestRepositoryApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositoryApi.java
@@ -15,12 +15,12 @@
import java.util.Arrays;
import java.util.List;
-import org.gitlab4j.api.Constants.ArchiveFormat;
import org.gitlab4j.api.models.Branch;
import org.gitlab4j.api.models.Commit;
import org.gitlab4j.api.models.CompareResults;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.RepositoryArchiveParams;
+import org.gitlab4j.models.Constants.ArchiveFormat;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/org/gitlab4j/api/TestRepositoryFileApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositoryFileApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestRepositoryFileApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositoryFileApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java
similarity index 97%
rename from src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java
index 86510172a..c84d454bc 100644
--- a/src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRepositorySubmodulesApi.java
@@ -12,6 +12,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Commit;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestRequestResponseLogging.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRequestResponseLogging.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestRequestResponseLogging.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestRequestResponseLogging.java
diff --git a/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java
index 3626297e6..3e57a4670 100644
--- a/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java
@@ -9,6 +9,7 @@
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.IssueEvent;
import org.gitlab4j.api.models.Project;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
diff --git a/src/test/java/org/gitlab4j/api/TestRunnersApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestRunnersApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestRunnersApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestRunnersApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestSearchApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSearchApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestSearchApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestSearchApi.java
index e1258f767..f2f6a53fc 100644
--- a/src/test/java/org/gitlab4j/api/TestSearchApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSearchApi.java
@@ -5,9 +5,6 @@
import java.util.List;
-import org.gitlab4j.api.Constants.GroupSearchScope;
-import org.gitlab4j.api.Constants.ProjectSearchScope;
-import org.gitlab4j.api.Constants.SearchScope;
import org.gitlab4j.api.models.Group;
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.MergeRequest;
@@ -17,6 +14,9 @@
import org.gitlab4j.api.models.SearchBlob;
import org.gitlab4j.api.models.Snippet;
import org.gitlab4j.api.models.User;
+import org.gitlab4j.models.Constants.GroupSearchScope;
+import org.gitlab4j.models.Constants.ProjectSearchScope;
+import org.gitlab4j.models.Constants.SearchScope;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestServicesApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestServicesApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestServicesApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestServicesApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java
similarity index 98%
rename from src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java
index 23e600997..363aec2f6 100644
--- a/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java
@@ -14,6 +14,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestSnippetsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSnippetsApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestSnippetsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestSnippetsApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestStreams.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestStreams.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestStreams.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestStreams.java
index 865dcc7e6..905f3dbe9 100644
--- a/src/test/java/org/gitlab4j/api/TestStreams.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestStreams.java
@@ -17,6 +17,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.User;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/src/test/java/org/gitlab4j/api/TestSystemHooksApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestSystemHooksApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestSystemHooksApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestSystemHooksApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestTagsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTagsApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestTagsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestTagsApi.java
index eacd475e7..0bac713c5 100644
--- a/src/test/java/org/gitlab4j/api/TestTagsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTagsApi.java
@@ -9,12 +9,12 @@
import java.util.List;
import java.util.Optional;
-import org.gitlab4j.api.Constants.SortOrder;
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.ProtectedTag;
import org.gitlab4j.api.models.Release;
import org.gitlab4j.api.models.Tag;
+import org.gitlab4j.models.Constants.SortOrder;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/org/gitlab4j/api/TestTodosApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTodosApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestTodosApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestTodosApi.java
index d938e22b2..c98183022 100644
--- a/src/test/java/org/gitlab4j/api/TestTodosApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTodosApi.java
@@ -8,11 +8,11 @@
import java.util.List;
import java.util.Random;
-import org.gitlab4j.api.Constants.TodoState;
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.Todo;
import org.gitlab4j.api.models.User;
+import org.gitlab4j.models.Constants.TodoState;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/org/gitlab4j/api/TestTopicsApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTopicsApi.java
similarity index 97%
rename from src/test/java/org/gitlab4j/api/TestTopicsApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestTopicsApi.java
index 926f969ce..14cfed09f 100644
--- a/src/test/java/org/gitlab4j/api/TestTopicsApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestTopicsApi.java
@@ -12,6 +12,7 @@
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Topic;
+import org.gitlab4j.models.Constants;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
diff --git a/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java
diff --git a/src/test/java/org/gitlab4j/api/TestUpload.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestUpload.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestUpload.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestUpload.java
diff --git a/src/test/java/org/gitlab4j/api/TestUserApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestUserApi.java
similarity index 99%
rename from src/test/java/org/gitlab4j/api/TestUserApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestUserApi.java
index 7dccb5cca..69c236d13 100644
--- a/src/test/java/org/gitlab4j/api/TestUserApi.java
+++ b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestUserApi.java
@@ -27,7 +27,7 @@
import org.gitlab4j.api.models.SshKey;
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.models.Version;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.utils.ISO8601;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
diff --git a/src/test/java/org/gitlab4j/api/TestWikisApi.java b/gitlab4j-api/src/test/java/org/gitlab4j/api/TestWikisApi.java
similarity index 100%
rename from src/test/java/org/gitlab4j/api/TestWikisApi.java
rename to gitlab4j-api/src/test/java/org/gitlab4j/api/TestWikisApi.java
diff --git a/src/test/resources/org/gitlab4j/api/application-settings.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/application-settings.json
similarity index 97%
rename from src/test/resources/org/gitlab4j/api/application-settings.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/application-settings.json
index 39998dd2a..06972fbb9 100644
--- a/src/test/resources/org/gitlab4j/api/application-settings.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/application-settings.json
@@ -1,49 +1,49 @@
-{
- "default_projects_limit": 100000,
- "signup_enabled": false,
- "password_authentication_enabled_for_web": true,
- "gravatar_enabled": true,
- "sign_in_text": "",
- "home_page_url": "",
- "default_branch_protection": 2,
- "restricted_visibility_levels": [],
- "max_attachment_size": 10,
- "session_expire_delay": 10080,
- "default_project_visibility": "internal",
- "default_snippet_visibility": "private",
- "default_group_visibility": "private",
- "outbound_local_requests_whitelist": [],
- "domain_whitelist": [],
- "domain_blacklist_enabled" : false,
- "domain_blacklist" : [],
- "external_authorization_service_enabled": true,
- "external_authorization_service_url": "https://authorize.me",
- "external_authorization_service_default_label": "default",
- "external_authorization_service_timeout": 0.5,
- "user_oauth_applications": true,
- "after_sign_out_path": "",
- "container_registry_token_expire_delay": 5,
- "repository_storages": ["default"],
- "plantuml_enabled": false,
- "terminal_max_session_time": 0,
- "polling_interval_multiplier": "1.0",
- "rsa_key_restriction": 0,
- "dsa_key_restriction": 0,
- "ecdsa_key_restriction": 0,
- "ed25519_key_restriction": 0,
- "first_day_of_week": 0,
- "enforce_terms": true,
- "terms": "Hello world!",
- "performance_bar_allowed_group_id": 42,
- "instance_statistics_visibility_private": false,
- "user_show_add_ssh_key_message": true,
- "file_template_project_id": 1,
- "local_markdown_version": 0,
- "asset_proxy_enabled": true,
- "asset_proxy_url": "https://assets.example.com",
- "asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"],
- "geo_node_allowed_ips": "0.0.0.0/0, ::/0",
- "allow_local_requests_from_hooks_and_services": true,
- "allow_local_requests_from_web_hooks_and_services": true,
- "allow_local_requests_from_system_hooks": false
+{
+ "default_projects_limit": 100000,
+ "signup_enabled": false,
+ "password_authentication_enabled_for_web": true,
+ "gravatar_enabled": true,
+ "sign_in_text": "",
+ "home_page_url": "",
+ "default_branch_protection": 2,
+ "restricted_visibility_levels": [],
+ "max_attachment_size": 10,
+ "session_expire_delay": 10080,
+ "default_project_visibility": "internal",
+ "default_snippet_visibility": "private",
+ "default_group_visibility": "private",
+ "outbound_local_requests_whitelist": [],
+ "domain_whitelist": [],
+ "domain_blacklist_enabled" : false,
+ "domain_blacklist" : [],
+ "external_authorization_service_enabled": true,
+ "external_authorization_service_url": "https://authorize.me",
+ "external_authorization_service_default_label": "default",
+ "external_authorization_service_timeout": 0.5,
+ "user_oauth_applications": true,
+ "after_sign_out_path": "",
+ "container_registry_token_expire_delay": 5,
+ "repository_storages": ["default"],
+ "plantuml_enabled": false,
+ "terminal_max_session_time": 0,
+ "polling_interval_multiplier": "1.0",
+ "rsa_key_restriction": 0,
+ "dsa_key_restriction": 0,
+ "ecdsa_key_restriction": 0,
+ "ed25519_key_restriction": 0,
+ "first_day_of_week": 0,
+ "enforce_terms": true,
+ "terms": "Hello world!",
+ "performance_bar_allowed_group_id": 42,
+ "instance_statistics_visibility_private": false,
+ "user_show_add_ssh_key_message": true,
+ "file_template_project_id": 1,
+ "local_markdown_version": 0,
+ "asset_proxy_enabled": true,
+ "asset_proxy_url": "https://assets.example.com",
+ "asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"],
+ "geo_node_allowed_ips": "0.0.0.0/0, ::/0",
+ "allow_local_requests_from_hooks_and_services": true,
+ "allow_local_requests_from_web_hooks_and_services": true,
+ "allow_local_requests_from_system_hooks": false
}
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/commit-discussions.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/commit-discussions.json
similarity index 96%
rename from src/test/resources/org/gitlab4j/api/commit-discussions.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/commit-discussions.json
index e57012008..db41199dd 100644
--- a/src/test/resources/org/gitlab4j/api/commit-discussions.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/commit-discussions.json
@@ -1,70 +1,70 @@
-[
- {
- "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
- "individual_note": false,
- "notes": [
- {
- "id": 1126,
- "type": "DiscussionNote",
- "body": "discussion text",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-03T21:54:39.668Z",
- "updated_at": "2018-03-03T21:54:39.668Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Commit",
- "resolvable": false
- },
- {
- "id": 1129,
- "type": "DiscussionNote",
- "body": "reply to the discussion",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T13:38:02.127Z",
- "updated_at": "2018-03-04T13:38:02.127Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Commit",
- "resolvable": false
- }
- ]
- },
- {
- "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
- "individual_note": true,
- "notes": [
- {
- "id": 1128,
- "body": "a single comment",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T09:17:22.520Z",
- "updated_at": "2018-03-04T09:17:22.520Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Commit",
- "resolvable": false
- }
- ]
- }
+[
+ {
+ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
+ "individual_note": false,
+ "notes": [
+ {
+ "id": 1126,
+ "type": "DiscussionNote",
+ "body": "discussion text",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-03T21:54:39.668Z",
+ "updated_at": "2018-03-03T21:54:39.668Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Commit",
+ "resolvable": false
+ },
+ {
+ "id": 1129,
+ "type": "DiscussionNote",
+ "body": "reply to the discussion",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T13:38:02.127Z",
+ "updated_at": "2018-03-04T13:38:02.127Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Commit",
+ "resolvable": false
+ }
+ ]
+ },
+ {
+ "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
+ "individual_note": true,
+ "notes": [
+ {
+ "id": 1128,
+ "body": "a single comment",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T09:17:22.520Z",
+ "updated_at": "2018-03-04T09:17:22.520Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Commit",
+ "resolvable": false
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/commit.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/commit.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/commit.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/commit.json
diff --git a/src/test/resources/org/gitlab4j/api/epic-discussions.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/epic-discussions.json
similarity index 96%
rename from src/test/resources/org/gitlab4j/api/epic-discussions.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/epic-discussions.json
index c190d0251..3851a79cb 100644
--- a/src/test/resources/org/gitlab4j/api/epic-discussions.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/epic-discussions.json
@@ -1,70 +1,70 @@
-[
- {
- "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
- "individual_note": false,
- "notes": [
- {
- "id": 1126,
- "type": "DiscussionNote",
- "body": "discussion text",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-03T21:54:39.668Z",
- "updated_at": "2018-03-03T21:54:39.668Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Epic",
- "resolvable": false
- },
- {
- "id": 1129,
- "type": "DiscussionNote",
- "body": "reply to the discussion",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T13:38:02.127Z",
- "updated_at": "2018-03-04T13:38:02.127Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Epic",
- "resolvable": false
- }
- ]
- },
- {
- "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
- "individual_note": true,
- "notes": [
- {
- "id": 1128,
- "body": "a single comment",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T09:17:22.520Z",
- "updated_at": "2018-03-04T09:17:22.520Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Epic",
- "resolvable": false
- }
- ]
- }
+[
+ {
+ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
+ "individual_note": false,
+ "notes": [
+ {
+ "id": 1126,
+ "type": "DiscussionNote",
+ "body": "discussion text",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-03T21:54:39.668Z",
+ "updated_at": "2018-03-03T21:54:39.668Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Epic",
+ "resolvable": false
+ },
+ {
+ "id": 1129,
+ "type": "DiscussionNote",
+ "body": "reply to the discussion",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T13:38:02.127Z",
+ "updated_at": "2018-03-04T13:38:02.127Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Epic",
+ "resolvable": false
+ }
+ ]
+ },
+ {
+ "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
+ "individual_note": true,
+ "notes": [
+ {
+ "id": 1128,
+ "body": "a single comment",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T09:17:22.520Z",
+ "updated_at": "2018-03-04T09:17:22.520Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Epic",
+ "resolvable": false
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/external-status-check-statuses.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/external-status-check-statuses.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/external-status-check-statuses.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/external-status-check-statuses.json
diff --git a/src/test/resources/org/gitlab4j/api/external-status-checks.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/external-status-checks.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/external-status-checks.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/external-status-checks.json
diff --git a/src/test/resources/org/gitlab4j/api/issue-discussions.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/issue-discussions.json
similarity index 96%
rename from src/test/resources/org/gitlab4j/api/issue-discussions.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/issue-discussions.json
index 78d1f2920..abb03a050 100644
--- a/src/test/resources/org/gitlab4j/api/issue-discussions.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/issue-discussions.json
@@ -1,69 +1,69 @@
-[
- {
- "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
- "individual_note": false,
- "notes": [
- {
- "id": 1126,
- "type": "DiscussionNote",
- "body": "discussion text",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-03T21:54:39.668Z",
- "updated_at": "2018-03-03T21:54:39.668Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Issue"
- },
- {
- "id": 1129,
- "type": "DiscussionNote",
- "body": "reply to the discussion",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T13:38:02.127Z",
- "updated_at": "2018-03-04T13:38:02.127Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Issue",
- "resolvable": false
- }
- ]
- },
- {
- "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
- "individual_note": true,
- "notes": [
- {
- "id": 1128,
- "body": "a single comment",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T09:17:22.520Z",
- "updated_at": "2018-03-04T09:17:22.520Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Issue",
- "resolvable": false
- }
- ]
- }
+[
+ {
+ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
+ "individual_note": false,
+ "notes": [
+ {
+ "id": 1126,
+ "type": "DiscussionNote",
+ "body": "discussion text",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-03T21:54:39.668Z",
+ "updated_at": "2018-03-03T21:54:39.668Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Issue"
+ },
+ {
+ "id": 1129,
+ "type": "DiscussionNote",
+ "body": "reply to the discussion",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T13:38:02.127Z",
+ "updated_at": "2018-03-04T13:38:02.127Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Issue",
+ "resolvable": false
+ }
+ ]
+ },
+ {
+ "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
+ "individual_note": true,
+ "notes": [
+ {
+ "id": 1128,
+ "body": "a single comment",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T09:17:22.520Z",
+ "updated_at": "2018-03-04T09:17:22.520Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Issue",
+ "resolvable": false
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/links.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/links.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/links.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/links.json
diff --git a/src/test/resources/org/gitlab4j/api/merge-request-discussions.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-discussions.json
similarity index 96%
rename from src/test/resources/org/gitlab4j/api/merge-request-discussions.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-discussions.json
index 40228b524..17108fe9d 100644
--- a/src/test/resources/org/gitlab4j/api/merge-request-discussions.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-discussions.json
@@ -1,72 +1,72 @@
-[
- {
- "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
- "individual_note": false,
- "notes": [
- {
- "id": 1126,
- "type": "DiscussionNote",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-03T21:54:39.668Z",
- "updated_at": "2018-03-03T21:54:39.668Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Merge request",
- "resolved": false,
- "resolvable": true
- },
- {
- "id": 1129,
- "type": "DiscussionNote",
- "body": "reply to the discussion",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T13:38:02.127Z",
- "updated_at": "2018-03-04T13:38:02.127Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Merge request",
- "resolved": false,
- "resolvable": true
- }
- ]
- },
- {
- "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
- "individual_note": true,
- "notes": [
- {
- "id": 1128,
- "body": "a single comment",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T09:17:22.520Z",
- "updated_at": "2018-03-04T09:17:22.520Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Merge request",
- "resolved": false,
- "resolvable": true
- }
- ]
- }
+[
+ {
+ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
+ "individual_note": false,
+ "notes": [
+ {
+ "id": 1126,
+ "type": "DiscussionNote",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-03T21:54:39.668Z",
+ "updated_at": "2018-03-03T21:54:39.668Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Merge request",
+ "resolved": false,
+ "resolvable": true
+ },
+ {
+ "id": 1129,
+ "type": "DiscussionNote",
+ "body": "reply to the discussion",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T13:38:02.127Z",
+ "updated_at": "2018-03-04T13:38:02.127Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Merge request",
+ "resolved": false,
+ "resolvable": true
+ }
+ ]
+ },
+ {
+ "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
+ "individual_note": true,
+ "notes": [
+ {
+ "id": 1128,
+ "body": "a single comment",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T09:17:22.520Z",
+ "updated_at": "2018-03-04T09:17:22.520Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Merge request",
+ "resolved": false,
+ "resolvable": true
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json
similarity index 97%
rename from src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json
index b2a36e72e..076a61fdd 100644
--- a/src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request-system-hook-event.json
@@ -1,116 +1,116 @@
-{
- "object_kind": "merge_request",
- "event_type": "merge_request",
- "event_name": "merge_request",
- "user": {
- "name": "Administrator",
- "username": "root",
- "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
- },
- "project": {
- "name": "Example",
- "description": "",
- "web_url": "http://example.com/jsmith/example",
- "git_ssh_url": "git@example.com:jsmith/example.git",
- "git_http_url": "http://example.com/jsmith/example.git",
- "namespace": "Jsmith",
- "visibility_level": 0,
- "path_with_namespace": "jsmith/example",
- "default_branch": "master",
- "ci_config_path": "",
- "homepage": "http://example.com/jsmith/example",
- "url": "git@example.com:jsmith/example.git",
- "ssh_url": "git@example.com:jsmith/example.git",
- "http_url": "http://example.com/jsmith/example.git"
- },
- "object_attributes": {
- "id": 90,
- "target_branch": "master",
- "source_branch": "ms-viewport",
- "source_project_id": 14,
- "author_id": 51,
- "assignee_id": 6,
- "title": "MS-Viewport",
- "created_at": "2017-09-20T08:31:45.944Z",
- "updated_at": "2017-09-28T12:23:42.365Z",
- "state": "opened",
- "merge_status": "unchecked",
- "target_project_id": 14,
- "iid": 1,
- "description": "",
- "updated_by_id": 1,
- "merge_params": {
- "force_remove_source_branch": "0"
- },
- "merge_when_pipeline_succeeds": false,
- "lock_version": 5,
- "time_estimate": 0,
- "last_edited_at": "2017-09-27T12:43:37.558Z",
- "last_edited_by_id": 1,
- "head_pipeline_id": 61,
- "ref_fetched": true,
- "source": {
- "name": "Awesome Project",
- "description": "",
- "web_url": "http://example.com/awesome_space/awesome_project",
- "git_ssh_url": "git@example.com:awesome_space/awesome_project.git",
- "git_http_url": "http://example.com/awesome_space/awesome_project.git",
- "namespace": "root",
- "visibility_level": 0,
- "path_with_namespace": "awesome_space/awesome_project",
- "default_branch": "master",
- "ci_config_path": "",
- "homepage": "http://example.com/awesome_space/awesome_project",
- "url": "http://example.com/awesome_space/awesome_project.git",
- "ssh_url": "git@example.com:awesome_space/awesome_project.git",
- "http_url": "http://example.com/awesome_space/awesome_project.git"
- },
- "target": {
- "name": "Awesome Project",
- "description": "Aut reprehenderit ut est.",
- "web_url": "http://example.com/awesome_space/awesome_project",
- "git_ssh_url": "git@example.com:awesome_space/awesome_project.git",
- "git_http_url": "http://example.com/awesome_space/awesome_project.git",
- "namespace": "Awesome Space",
- "visibility_level": 0,
- "path_with_namespace": "awesome_space/awesome_project",
- "default_branch": "master",
- "ci_config_path": "",
- "homepage": "http://example.com/awesome_space/awesome_project",
- "url": "http://example.com/awesome_space/awesome_project.git",
- "ssh_url": "git@example.com:awesome_space/awesome_project.git",
- "http_url": "http://example.com/awesome_space/awesome_project.git"
- },
- "last_commit": {
- "id": "ba3e0d8ff79c80d5b0bbb4f3e2e343e0aaa662b7",
- "message": "fixed readme",
- "timestamp": "2017-09-26T16:12:57Z",
- "url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
- "author": {
- "name": "GitLab dev user",
- "email": "gitlabdev@dv6700.(none)"
- }
- },
- "work_in_progress": false,
- "total_time_spent": 0,
- "human_total_time_spent": "0m",
- "human_time_estimate": "1h",
- "assignee_ids": [
- 96
- ]
- },
- "labels": [],
- "repository": {
- "name": "git-gpg-test",
- "url": "git@example.com:awesome_space/awesome_project.git",
- "description": "",
- "homepage": "http://example.com/awesome_space/awesome_project"
- },
- "assignees": [
- {
- "name": "User1",
- "username": "user1",
- "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
- }
- ]
-}
+{
+ "object_kind": "merge_request",
+ "event_type": "merge_request",
+ "event_name": "merge_request",
+ "user": {
+ "name": "Administrator",
+ "username": "root",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
+ },
+ "project": {
+ "name": "Example",
+ "description": "",
+ "web_url": "http://example.com/jsmith/example",
+ "git_ssh_url": "git@example.com:jsmith/example.git",
+ "git_http_url": "http://example.com/jsmith/example.git",
+ "namespace": "Jsmith",
+ "visibility_level": 0,
+ "path_with_namespace": "jsmith/example",
+ "default_branch": "master",
+ "ci_config_path": "",
+ "homepage": "http://example.com/jsmith/example",
+ "url": "git@example.com:jsmith/example.git",
+ "ssh_url": "git@example.com:jsmith/example.git",
+ "http_url": "http://example.com/jsmith/example.git"
+ },
+ "object_attributes": {
+ "id": 90,
+ "target_branch": "master",
+ "source_branch": "ms-viewport",
+ "source_project_id": 14,
+ "author_id": 51,
+ "assignee_id": 6,
+ "title": "MS-Viewport",
+ "created_at": "2017-09-20T08:31:45.944Z",
+ "updated_at": "2017-09-28T12:23:42.365Z",
+ "state": "opened",
+ "merge_status": "unchecked",
+ "target_project_id": 14,
+ "iid": 1,
+ "description": "",
+ "updated_by_id": 1,
+ "merge_params": {
+ "force_remove_source_branch": "0"
+ },
+ "merge_when_pipeline_succeeds": false,
+ "lock_version": 5,
+ "time_estimate": 0,
+ "last_edited_at": "2017-09-27T12:43:37.558Z",
+ "last_edited_by_id": 1,
+ "head_pipeline_id": 61,
+ "ref_fetched": true,
+ "source": {
+ "name": "Awesome Project",
+ "description": "",
+ "web_url": "http://example.com/awesome_space/awesome_project",
+ "git_ssh_url": "git@example.com:awesome_space/awesome_project.git",
+ "git_http_url": "http://example.com/awesome_space/awesome_project.git",
+ "namespace": "root",
+ "visibility_level": 0,
+ "path_with_namespace": "awesome_space/awesome_project",
+ "default_branch": "master",
+ "ci_config_path": "",
+ "homepage": "http://example.com/awesome_space/awesome_project",
+ "url": "http://example.com/awesome_space/awesome_project.git",
+ "ssh_url": "git@example.com:awesome_space/awesome_project.git",
+ "http_url": "http://example.com/awesome_space/awesome_project.git"
+ },
+ "target": {
+ "name": "Awesome Project",
+ "description": "Aut reprehenderit ut est.",
+ "web_url": "http://example.com/awesome_space/awesome_project",
+ "git_ssh_url": "git@example.com:awesome_space/awesome_project.git",
+ "git_http_url": "http://example.com/awesome_space/awesome_project.git",
+ "namespace": "Awesome Space",
+ "visibility_level": 0,
+ "path_with_namespace": "awesome_space/awesome_project",
+ "default_branch": "master",
+ "ci_config_path": "",
+ "homepage": "http://example.com/awesome_space/awesome_project",
+ "url": "http://example.com/awesome_space/awesome_project.git",
+ "ssh_url": "git@example.com:awesome_space/awesome_project.git",
+ "http_url": "http://example.com/awesome_space/awesome_project.git"
+ },
+ "last_commit": {
+ "id": "ba3e0d8ff79c80d5b0bbb4f3e2e343e0aaa662b7",
+ "message": "fixed readme",
+ "timestamp": "2017-09-26T16:12:57Z",
+ "url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
+ "author": {
+ "name": "GitLab dev user",
+ "email": "gitlabdev@dv6700.(none)"
+ }
+ },
+ "work_in_progress": false,
+ "total_time_spent": 0,
+ "human_total_time_spent": "0m",
+ "human_time_estimate": "1h",
+ "assignee_ids": [
+ 96
+ ]
+ },
+ "labels": [],
+ "repository": {
+ "name": "git-gpg-test",
+ "url": "git@example.com:awesome_space/awesome_project.git",
+ "description": "",
+ "homepage": "http://example.com/awesome_space/awesome_project"
+ },
+ "assignees": [
+ {
+ "name": "User1",
+ "username": "user1",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
+ }
+ ]
+}
diff --git a/src/test/resources/org/gitlab4j/api/merge-request.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/merge-request.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/merge-request.json
diff --git a/src/test/resources/org/gitlab4j/api/snippet-discussions.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/snippet-discussions.json
similarity index 96%
rename from src/test/resources/org/gitlab4j/api/snippet-discussions.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/snippet-discussions.json
index 1e463682b..f7c1cd157 100644
--- a/src/test/resources/org/gitlab4j/api/snippet-discussions.json
+++ b/gitlab4j-api/src/test/resources/org/gitlab4j/api/snippet-discussions.json
@@ -1,69 +1,69 @@
-[
- {
- "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
- "individual_note": false,
- "notes": [
- {
- "id": 1126,
- "type": "DiscussionNote",
- "body": "discussion text",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-03T21:54:39.668Z",
- "updated_at": "2018-03-03T21:54:39.668Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Snippet"
- },
- {
- "id": 1129,
- "type": "DiscussionNote",
- "body": "reply to the discussion",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T13:38:02.127Z",
- "updated_at": "2018-03-04T13:38:02.127Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Snippet",
- "resolvable": false
- }
- ]
- },
- {
- "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
- "individual_note": true,
- "notes": [
- {
- "id": 1128,
- "body": "a single comment",
- "author": {
- "id": 1,
- "name": "root",
- "username": "root",
- "state": "active",
- "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
- "web_url": "http://localhost:3000/root"
- },
- "created_at": "2018-03-04T09:17:22.520Z",
- "updated_at": "2018-03-04T09:17:22.520Z",
- "system": false,
- "noteable_id": 3,
- "noteable_type": "Snippet",
- "resolvable": false
- }
- ]
- }
+[
+ {
+ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7",
+ "individual_note": false,
+ "notes": [
+ {
+ "id": 1126,
+ "type": "DiscussionNote",
+ "body": "discussion text",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-03T21:54:39.668Z",
+ "updated_at": "2018-03-03T21:54:39.668Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Snippet"
+ },
+ {
+ "id": 1129,
+ "type": "DiscussionNote",
+ "body": "reply to the discussion",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T13:38:02.127Z",
+ "updated_at": "2018-03-04T13:38:02.127Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Snippet",
+ "resolvable": false
+ }
+ ]
+ },
+ {
+ "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6",
+ "individual_note": true,
+ "notes": [
+ {
+ "id": 1128,
+ "body": "a single comment",
+ "author": {
+ "id": 1,
+ "name": "root",
+ "username": "root",
+ "state": "active",
+ "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2018-03-04T09:17:22.520Z",
+ "updated_at": "2018-03-04T09:17:22.520Z",
+ "system": false,
+ "noteable_id": 3,
+ "noteable_type": "Snippet",
+ "resolvable": false
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/src/test/resources/org/gitlab4j/api/topic.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/topic.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/topic.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/topic.json
diff --git a/src/test/resources/org/gitlab4j/api/user-list.json b/gitlab4j-api/src/test/resources/org/gitlab4j/api/user-list.json
similarity index 100%
rename from src/test/resources/org/gitlab4j/api/user-list.json
rename to gitlab4j-api/src/test/resources/org/gitlab4j/api/user-list.json
diff --git a/gitlab4j-models/build.gradle b/gitlab4j-models/build.gradle
new file mode 100644
index 000000000..08b75d823
--- /dev/null
+++ b/gitlab4j-models/build.gradle
@@ -0,0 +1,51 @@
+dependencies {
+ api 'com.fasterxml.jackson.core:jackson-annotations:2.14.1'
+ api 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
+ testImplementation 'org.mockito:mockito-core:5.2.0'
+ testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0'
+ testImplementation 'org.hamcrest:hamcrest-all:1.3'
+ testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.2'
+ testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.4"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.4"
+}
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ pom {
+ name = 'GitLab4J-API - GitLab API Java Models'
+ description = 'GitLab4J-API (gitlab4j-models) provides java models for working with GitLab repositories and servers via the GitLab REST API.'
+ packaging = 'jar'
+ url = 'https://' + "$githubRepositoryOwner" + '.github.io/' + "$githubRepositoryName" + '/'
+ licenses {
+ license {
+ name = 'The MIT License (MIT)'
+ url = 'http://opensource.org/licenses/MIT'
+ distribution = 'repo'
+ }
+ }
+ developers {
+ developer {
+ id = 'gmessner'
+ name = 'Greg Messner'
+ email = 'greg@messners.com'
+ }
+ developer {
+ id = 'gdesaintmartinlacaze'
+ name = 'Gautier de Saint Martin Lacaze'
+ email = 'gautier@jabby-techs.fr'
+ }
+ developer {
+ url = 'https://github.com/orgs/' + "$githubRepositoryOwner" + '/people'
+ }
+ }
+ scm {
+ connection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git'
+ developerConnection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git'
+ url = 'https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '/'
+ }
+ }
+ from components.java
+ }
+ }
+}
diff --git a/src/main/java/org/gitlab4j/api/models/AbstractEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/AbstractEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java
index a494597e0..d63d37a71 100644
--- a/src/main/java/org/gitlab4j/api/models/AbstractEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractEpic.java
@@ -5,8 +5,8 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/AbstractGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/AbstractGroup.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java
index 70e17003c..9337dbc4b 100644
--- a/src/main/java/org/gitlab4j/api/models/AbstractGroup.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractGroup.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
diff --git a/src/main/java/org/gitlab4j/api/models/AbstractIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/AbstractIssue.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java
index 33e16cabc..63166409a 100644
--- a/src/main/java/org/gitlab4j/api/models/AbstractIssue.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractIssue.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants.IssueState;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.IssueState;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java
index 81045e40c..bdfe2bf27 100644
--- a/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class AbstractMinimalEpic> implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/AbstractUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/AbstractUser.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java
index cf03fe7fa..fe22106e5 100644
--- a/src/main/java/org/gitlab4j/api/models/AbstractUser.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AbstractUser.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
diff --git a/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java
index bb7a0e6de..63d63a7b3 100644
--- a/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AcceptMergeRequestParams.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class AcceptMergeRequestParams implements Serializable {
private static final long serialVersionUID = 1L;
@@ -85,8 +85,8 @@ public AcceptMergeRequestParams withSquashCommitMessage(String squashCommitMessa
*
* @return a GitLabApiForm instance holding the form parameters for this AcceptMergeRequestParams instance
*/
- public GitLabApiForm getForm() {
- return new GitLabApiForm()
+ public GitLabForm getForm() {
+ return new GitLabForm()
.withParam("merge_commit_message", mergeCommitMessage)
.withParam("merge_when_pipeline_succeeds", mergeWhenPipelineSucceeds)
.withParam("sha", sha)
diff --git a/src/main/java/org/gitlab4j/api/models/AccessLevel.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessLevel.java
similarity index 90%
rename from src/main/java/org/gitlab4j/api/models/AccessLevel.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessLevel.java
index c1ed04fba..3a641b0ef 100644
--- a/src/main/java/org/gitlab4j/api/models/AccessLevel.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessLevel.java
@@ -3,8 +3,6 @@
import java.util.HashMap;
import java.util.Map;
-import org.gitlab4j.api.GitLabApi;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -44,7 +42,6 @@ public static AccessLevel forValue(Integer value) {
return (level);
}
- GitLabApi.getLogger().warning(String.format("[%d] is not a valid GitLab access level.", value));
return (value == null ? null : INVALID);
}
diff --git a/src/main/java/org/gitlab4j/api/models/AccessRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/AccessRequest.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AccessRequest.java
diff --git a/src/main/java/org/gitlab4j/api/models/AllowedTo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java
similarity index 88%
rename from src/main/java/org/gitlab4j/api/models/AllowedTo.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java
index d87d3d003..f42c12bac 100644
--- a/src/main/java/org/gitlab4j/api/models/AllowedTo.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AllowedTo.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
/**
* This class is used by the ProtectedBranchesAPi to set up the
@@ -36,10 +36,10 @@ public AllowedTo withGroupId(Long groupId) {
return (this);
}
- public GitLabApiForm getForm(GitLabApiForm form, String allowedToName) {
+ public GitLabForm getForm(GitLabForm form, String allowedToName) {
if (form == null) {
- form = new GitLabApiForm();
+ form = new GitLabForm();
}
return (form.withParam(allowedToName + "[][access_level]", accessLevel)
diff --git a/src/main/java/org/gitlab4j/api/models/Application.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Application.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Application.java
diff --git a/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/ApplicationSettings.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java
index 6d50d8f42..5f62a9cbd 100644
--- a/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java
@@ -8,8 +8,7 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;
@@ -84,7 +83,7 @@ public Object getSetting(String setting) {
return (settings.get(setting));
}
- public Object addSetting(String setting, Object value) throws GitLabApiException {
+ public Object addSetting(String setting, Object value) {
Setting appSetting = Setting.forValue(setting);
if (appSetting != null) {
@@ -95,7 +94,7 @@ public Object addSetting(String setting, Object value) throws GitLabApiException
return (value);
}
- public Object addSetting(Setting setting, Object value) throws GitLabApiException {
+ public Object addSetting(Setting setting, Object value) {
if (value instanceof JsonNode) {
value = jsonNodeToValue((JsonNode) value, setting);
diff --git a/src/main/java/org/gitlab4j/api/models/ApprovalRule.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/ApprovalRule.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java
index 3d56929d6..f4635e96a 100644
--- a/src/main/java/org/gitlab4j/api/models/ApprovalRule.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRule.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ApprovalRule implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java
index a55ad02ef..b52ef1a4e 100644
--- a/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class ApprovalRuleParams implements Serializable {
private static final long serialVersionUID = 1L;
@@ -104,8 +104,8 @@ public ApprovalRuleParams withUsernames(List usernames) {
*
* @return a GitLabApiForm instance holding the form parameters for this ApprovalRuleParams instance
*/
- public GitLabApiForm getForm() {
- return new GitLabApiForm()
+ public GitLabForm getForm() {
+ return new GitLabForm()
.withParam("approvals_required", approvalsRequired, true)
.withParam("name", name, true)
.withParam("applies_to_all_protected_branches", appliesToAllProtectedBranches)
diff --git a/src/main/java/org/gitlab4j/api/models/ApprovalState.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/ApprovalState.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java
index 64a179ca3..3a8893afa 100644
--- a/src/main/java/org/gitlab4j/api/models/ApprovalState.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovalState.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ApprovalState implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ApprovedBy.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ApprovedBy.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java
index aadc1d551..0632e0e79 100644
--- a/src/main/java/org/gitlab4j/api/models/ApprovedBy.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ApprovedBy.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/Artifact.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/Artifact.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java
index c64d0043c..bbdbf1eb4 100644
--- a/src/main/java/org/gitlab4j/api/models/Artifact.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Artifact.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/ArtifactsFile.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java
index 1c1639f27..63c7df8b0 100644
--- a/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ArtifactsFile.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ArtifactsFile implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Assets.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Assets.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java
index 9e3844e14..d4200dad7 100644
--- a/src/main/java/org/gitlab4j/api/models/Assets.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assets.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.Constants.ArchiveFormat;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.ArchiveFormat;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class is part of the Release class model.
diff --git a/src/main/java/org/gitlab4j/api/models/Assignee.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assignee.java
similarity index 84%
rename from src/main/java/org/gitlab4j/api/models/Assignee.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assignee.java
index 96b3d5015..984779433 100644
--- a/src/main/java/org/gitlab4j/api/models/Assignee.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Assignee.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Assignee extends AbstractUser {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/AuditEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/AuditEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java
index ace84a1bb..001b19bd4 100644
--- a/src/main/java/org/gitlab4j/api/models/AuditEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEvent.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class AuditEvent implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/AuditEventDetail.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java
index bf4904907..327a4e717 100644
--- a/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AuditEventDetail.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class AuditEventDetail implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Author.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Author.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Author.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Author.java
diff --git a/src/main/java/org/gitlab4j/api/models/AwardEmoji.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/AwardEmoji.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java
index 5f6c1d763..9293f5109 100644
--- a/src/main/java/org/gitlab4j/api/models/AwardEmoji.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/AwardEmoji.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Badge.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Badge.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java
index b734b8733..fff0edb0a 100644
--- a/src/main/java/org/gitlab4j/api/models/Badge.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Badge.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Blame.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/Blame.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java
index e8fe1d96a..a9b9b7ddb 100644
--- a/src/main/java/org/gitlab4j/api/models/Blame.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Blame.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Blame implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Board.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Board.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java
index dc8e4c1f1..802bd78eb 100644
--- a/src/main/java/org/gitlab4j/api/models/Board.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Board.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Board implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/BoardList.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/BoardList.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java
index a4d6fb2bc..5780d2c31 100644
--- a/src/main/java/org/gitlab4j/api/models/BoardList.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BoardList.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class BoardList implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Branch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Branch.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java
index 1ae6fb372..72e6db470 100644
--- a/src/main/java/org/gitlab4j/api/models/Branch.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Branch.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Branch implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java
index 97672d2fb..63554fcd3 100644
--- a/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class BranchAccessLevel implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Bridge.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Bridge.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java
index 7be2c686d..b7a4779ca 100644
--- a/src/main/java/org/gitlab4j/api/models/Bridge.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Bridge.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Bridge implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/models/ChangelogPayload.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java
index e708ba4c9..f9ce9cea9 100644
--- a/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChangelogPayload.java
@@ -3,9 +3,9 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.ISO8601;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -26,8 +26,8 @@ public ChangelogPayload(String version) {
}
@JsonIgnore
- public GitLabApiForm getFormData() {
- return new GitLabApiForm()
+ public GitLabForm getFormData() {
+ return new GitLabForm()
.withParam("version", version, true)
.withParam("from", from)
.withParam("to", to)
diff --git a/src/main/java/org/gitlab4j/api/models/Changes.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Changes.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java
index b25c0af74..69f060cbd 100644
--- a/src/main/java/org/gitlab4j/api/models/Changes.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Changes.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/ChildEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChildEpic.java
similarity index 83%
rename from src/main/java/org/gitlab4j/api/models/ChildEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChildEpic.java
index 4c066444f..9b9ba5e0e 100644
--- a/src/main/java/org/gitlab4j/api/models/ChildEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ChildEpic.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ChildEpic extends AbstractEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Comment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/Comment.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java
index f7919da58..13f9fae81 100644
--- a/src/main/java/org/gitlab4j/api/models/Comment.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Comment.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants.LineType;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.LineType;
+import org.gitlab4j.models.utils.JacksonJson;
public class Comment implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Commit.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/Commit.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java
index 163b497d2..b97e976b4 100644
--- a/src/main/java/org/gitlab4j/api/models/Commit.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Commit.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Commit implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/CommitAction.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/models/CommitAction.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java
index 6ca541ee8..20c8c8822 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitAction.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitAction.java
@@ -4,11 +4,10 @@
import java.io.IOException;
import java.io.Serializable;
-import org.gitlab4j.api.Constants.Encoding;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.utils.FileUtils;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants.Encoding;
+import org.gitlab4j.models.utils.FileUtils;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -140,12 +139,12 @@ public CommitAction withExecuteFilemode(Boolean executeFilemode) {
return this;
}
- public CommitAction withFileContent(String filePath, Encoding encoding) throws GitLabApiException {
+ public CommitAction withFileContent(String filePath, Encoding encoding) {
File file = new File(filePath);
return (withFileContent(file, filePath, encoding));
}
- public CommitAction withFileContent(File file, String filePath, Encoding encoding) throws GitLabApiException {
+ public CommitAction withFileContent(File file, String filePath, Encoding encoding) {
this.encoding = (encoding != null ? encoding : Encoding.TEXT);
this.filePath = filePath;
@@ -153,7 +152,7 @@ public CommitAction withFileContent(File file, String filePath, Encoding encodin
try {
content = FileUtils.getFileContentAsString(file, this.encoding);
} catch (IOException e) {
- throw new GitLabApiException(e);
+ throw new IllegalStateException(e);
}
return (this);
diff --git a/src/main/java/org/gitlab4j/api/models/CommitPayload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/CommitPayload.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java
index 16663c7f9..07e0bc283 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitPayload.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitPayload.java
@@ -4,7 +4,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class CommitPayload implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/CommitRef.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/CommitRef.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java
index 3463c9de5..dbc25c5a9 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitRef.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitRef.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/CommitStats.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/CommitStats.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java
index 427063e5b..1c15bba32 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitStats.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStats.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class CommitStats implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/CommitStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/CommitStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java
index 285dc5ae4..544e6e6d4 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatus.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class CommitStatus implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java
similarity index 84%
rename from src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java
index b8c07804b..190fb688f 100644
--- a/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CommitStatusFilter.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -39,13 +39,13 @@ public CommitStatusFilter withAll(Boolean all) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("ref", ref)
.withParam("stage", stage)
.withParam("name", name)
diff --git a/src/main/java/org/gitlab4j/api/models/CompareResults.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/CompareResults.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java
index 5973a97d3..139106375 100644
--- a/src/main/java/org/gitlab4j/api/models/CompareResults.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CompareResults.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class CompareResults implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Contributor.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Contributor.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Contributor.java
diff --git a/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java
index c255800a3..fd4ebba81 100644
--- a/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CreatedChildEpic.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class CreatedChildEpic extends AbstractMinimalEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/CustomAttribute.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/CustomAttribute.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/CustomAttribute.java
diff --git a/src/main/java/org/gitlab4j/api/models/DeployKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/DeployKey.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java
index c10ab176c..5994075f5 100644
--- a/src/main/java/org/gitlab4j/api/models/DeployKey.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployKey.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class DeployKey implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/DeployToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/DeployToken.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java
index 73fbda326..61b7e38b3 100644
--- a/src/main/java/org/gitlab4j/api/models/DeployToken.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeployToken.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.utils.JacksonJson;
public class DeployToken implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Deployable.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Deployable.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java
index a4d58fd23..43358b9c2 100644
--- a/src/main/java/org/gitlab4j/api/models/Deployable.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployable.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants.DeploymentStatus;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.DeploymentStatus;
+import org.gitlab4j.models.utils.JacksonJson;
public class Deployable implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Deployment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Deployment.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java
index 0f0381903..dd37155b6 100644
--- a/src/main/java/org/gitlab4j/api/models/Deployment.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Deployment.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants.DeploymentStatus;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.DeploymentStatus;
+import org.gitlab4j.models.utils.JacksonJson;
public class Deployment implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/models/DeploymentFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java
index e46ac359b..7989e9128 100644
--- a/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DeploymentFilter.java
@@ -3,12 +3,12 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.Constants.DeploymentOrderBy;
-import org.gitlab4j.api.Constants.DeploymentStatus;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.Constants.DeploymentOrderBy;
+import org.gitlab4j.models.Constants.DeploymentStatus;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -174,13 +174,13 @@ public DeploymentFilter withStatus(DeploymentStatus status) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("order_by", orderBy)
.withParam("sort", sortOrder)
.withParam("updated_after", ISO8601.toString(updatedAfter, false))
diff --git a/src/main/java/org/gitlab4j/api/models/DetailedStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/DetailedStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java
index c579e1601..ffa57f468 100644
--- a/src/main/java/org/gitlab4j/api/models/DetailedStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DetailedStatus.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class is part of the Pipeline message.
diff --git a/src/main/java/org/gitlab4j/api/models/Diff.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Diff.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java
index 21d1f0836..48285ebf0 100644
--- a/src/main/java/org/gitlab4j/api/models/Diff.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Diff.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/DiffRef.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/DiffRef.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java
index 4ee04b6d6..1b5b9052c 100644
--- a/src/main/java/org/gitlab4j/api/models/DiffRef.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DiffRef.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class DiffRef implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Discussion.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/Discussion.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java
index 1e82d3862..748982e3f 100644
--- a/src/main/java/org/gitlab4j/api/models/Discussion.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Discussion.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Discussion implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
index f7a88f954..466118ffd 100644
--- a/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class DownstreamPipeline implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Duration.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Duration.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java
index 4971a639c..f720b2889 100644
--- a/src/main/java/org/gitlab4j/api/models/Duration.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Duration.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.DurationUtils;
+import org.gitlab4j.models.utils.DurationUtils;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Email.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Email.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Email.java
diff --git a/src/main/java/org/gitlab4j/api/models/Environment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Environment.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java
index 36ca1c1f7..b630a1a51 100644
--- a/src/main/java/org/gitlab4j/api/models/Environment.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Environment.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Epic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Epic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java
index 950b37ae7..e73530d73 100644
--- a/src/main/java/org/gitlab4j/api/models/Epic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Epic.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Epic extends AbstractEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/EpicFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/EpicFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java
index 07c460b47..db191dcb6 100644
--- a/src/main/java/org/gitlab4j/api/models/EpicFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicFilter.java
@@ -5,12 +5,12 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import org.gitlab4j.api.Constants.EpicOrderBy;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
import org.gitlab4j.api.models.AbstractEpic.EpicState;
-import org.gitlab4j.api.utils.ISO8601;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants.EpicOrderBy;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -263,8 +263,8 @@ public EpicFilter withNot(EpicField field, Object value) {
*
* @return a GitLabApiForm instance holding the query parameters for this GroupFilter instance
*/
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("author_id", authorId)
.withParam("author_username", authorUsername)
.withParam("labels", labels)
diff --git a/src/main/java/org/gitlab4j/api/models/EpicInLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicInLink.java
similarity index 83%
rename from src/main/java/org/gitlab4j/api/models/EpicInLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicInLink.java
index 0ef8addad..00c415ee1 100644
--- a/src/main/java/org/gitlab4j/api/models/EpicInLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicInLink.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EpicInLink extends AbstractEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/EpicIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/EpicIssue.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java
index 9b4cb038b..d485c6069 100644
--- a/src/main/java/org/gitlab4j/api/models/EpicIssue.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java
@@ -2,7 +2,7 @@
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/EpicIssueLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java
index 570bd4604..92df1bae6 100644
--- a/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssueLink.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EpicIssueLink implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Event.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Event.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java
index d4bc2c252..928fa83d5 100644
--- a/src/main/java/org/gitlab4j/api/models/Event.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Event.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants.TargetType;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.TargetType;
+import org.gitlab4j.models.utils.JacksonJson;
public class Event implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/EventData.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/EventData.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java
index 9ec1990cd..856203e90 100644
--- a/src/main/java/org/gitlab4j/api/models/EventData.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/EventData.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventData implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Exists.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java
similarity index 90%
rename from src/main/java/org/gitlab4j/api/models/Exists.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java
index 51c8c294f..6375d29bf 100644
--- a/src/main/java/org/gitlab4j/api/models/Exists.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Exists.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Exists implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ExportStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ExportStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java
index e7a86cecc..42f2c29e9 100644
--- a/src/main/java/org/gitlab4j/api/models/ExportStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExportStatus.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java
index 12fbe76ae..10001419f 100644
--- a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheck.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ExternalStatusCheck implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java
index f14d67c8c..295df08e5 100644
--- a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckProtectedBranch.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ExternalStatusCheckProtectedBranch implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java
index 6a5a8bcb5..1755f6dc5 100644
--- a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckResult.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ExternalStatusCheckResult implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java
index 9c5346ab9..8f0a5de72 100644
--- a/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ExternalStatusCheckStatus.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/FileUpload.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/FileUpload.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java
index e9041b5dc..00439ab4d 100644
--- a/src/main/java/org/gitlab4j/api/models/FileUpload.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/FileUpload.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class FileUpload implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java
index 620fe4e98..ace61c81f 100644
--- a/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplate.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GitLabCiTemplate implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java
index 7ab46df7f..072917921 100644
--- a/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GitLabCiTemplateElement.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GitLabCiTemplateElement implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/GpgKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/GpgKey.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgKey.java
diff --git a/src/main/java/org/gitlab4j/api/models/GpgSignature.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/GpgSignature.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java
index 30d60f035..acbb887e8 100644
--- a/src/main/java/org/gitlab4j/api/models/GpgSignature.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GpgSignature.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GpgSignature implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Group.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Group.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java
index f4c957a4e..bfec0db61 100644
--- a/src/main/java/org/gitlab4j/api/models/Group.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Group.java
@@ -3,10 +3,10 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants.DefaultBranchProtectionLevel;
-import org.gitlab4j.api.Constants.ProjectCreationLevel;
-import org.gitlab4j.api.Constants.SubgroupCreationLevel;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.DefaultBranchProtectionLevel;
+import org.gitlab4j.models.Constants.ProjectCreationLevel;
+import org.gitlab4j.models.Constants.SubgroupCreationLevel;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/models/GroupAccessToken.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java
index 411eaa668..b7806911d 100644
--- a/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupAccessToken.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GroupAccessToken extends ImpersonationToken {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/GroupFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/GroupFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java
index b557b3b3d..9e1654554 100644
--- a/src/main/java/org/gitlab4j/api/models/GroupFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupFilter.java
@@ -4,10 +4,10 @@
import java.util.ArrayList;
import java.util.List;
-import org.gitlab4j.api.Constants.GroupOrderBy;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.GroupOrderBy;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class is used to filter Groups when getting lists of groups.
@@ -155,8 +155,8 @@ public GroupFilter withTopLevelOnly(Boolean topLevelOnly) {
*
* @return a GitLabApiForm instance holding the query parameters for this GroupFilter instance
*/
- public GitLabApiForm getQueryParams() {
- GitLabApiForm form = new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ GitLabForm form = new GitLabForm()
.withParam("skip_groups", skipGroups)
.withParam("all_available", allAvailable)
.withParam("search", search)
diff --git a/src/main/java/org/gitlab4j/api/models/GroupHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/GroupHook.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHook.java
diff --git a/src/main/java/org/gitlab4j/api/models/GroupHookParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/GroupHookParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java
index e2a9de494..e0fcb0019 100644
--- a/src/main/java/org/gitlab4j/api/models/GroupHookParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupHookParams.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class GroupHookParams implements Serializable {
private static final long serialVersionUID = 1L;
@@ -32,9 +32,9 @@ public class GroupHookParams implements Serializable {
private Boolean resourceAccessTokenEvents;
private String customWebhookTemplate;
- public GitLabApiForm getForm() {
+ public GitLabForm getForm() {
- return new GitLabApiForm()
+ return new GitLabForm()
.withParam("url", url, true)
.withParam("name", name)
.withParam("description", description)
diff --git a/src/main/java/org/gitlab4j/api/models/GroupParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/GroupParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java
index 087ebc234..a9cc63cbd 100644
--- a/src/main/java/org/gitlab4j/api/models/GroupParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupParams.java
@@ -2,14 +2,14 @@
import java.io.Serializable;
-import org.gitlab4j.api.Constants.DefaultBranchProtectionLevel;
-import org.gitlab4j.api.Constants.ProjectCreationLevel;
-import org.gitlab4j.api.Constants.SubgroupCreationLevel;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.Constants.DefaultBranchProtectionLevel;
+import org.gitlab4j.models.Constants.ProjectCreationLevel;
+import org.gitlab4j.models.Constants.SubgroupCreationLevel;
+import org.gitlab4j.models.GitLabForm;
/**
- * This class is utilized by the {@link org.gitlab4j.api.GroupApi#createGroup(GroupParams)}
- * and {@link org.gitlab4j.api.GroupApi#updateGroup(Object, GroupParams)} methods to set
+ * This class is utilized by the org.gitlab4j.api.GroupApi#createGroup(GroupParams)
+ * and org.gitlab4j.api.GroupApi#updateGroup(Object, GroupParams)
methods to set
* the parameters for the call to the GitLab API.
*/
public class GroupParams implements Serializable {
@@ -167,9 +167,9 @@ public GroupParams withPreventForkingOutsideGroup(Boolean preventForkingOutsideG
* @return a GitLabApiForm instance holding the parameters for the group create or update operation
* @throws RuntimeException if required parameters are missing
*/
- public GitLabApiForm getForm(boolean isCreate) {
+ public GitLabForm getForm(boolean isCreate) {
- GitLabApiForm form = new GitLabApiForm()
+ GitLabForm form = new GitLabForm()
.withParam("name", name, isCreate)
.withParam("path", path, isCreate)
.withParam("description", description)
diff --git a/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java
index fd2b6f496..f66582c96 100644
--- a/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/GroupProjectsFilter.java
@@ -2,10 +2,10 @@
import java.io.Serializable;
-import org.gitlab4j.api.Constants.ProjectOrderBy;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.ProjectOrderBy;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class is used to filter Projects when getting lists of projects for a specified group.
@@ -176,8 +176,8 @@ public GroupProjectsFilter withShared(Boolean withShared) {
*
* @return a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
*/
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("archived", archived)
.withParam("visibility", visibility)
.withParam("order_by", orderBy)
diff --git a/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java
index de305644f..1dc0f945b 100644
--- a/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckInfo.java
@@ -3,7 +3,7 @@
import java.io.IOException;
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
diff --git a/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/HealthCheckItem.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java
index 1266fbe8b..7126092df 100644
--- a/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckItem.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class HealthCheckItem implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java
index c86e460a8..1ca539218 100644
--- a/src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/HealthCheckStatus.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Identity.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/Identity.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java
index b81d4d89b..3aad9e02b 100644
--- a/src/main/java/org/gitlab4j/api/models/Identity.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Identity.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Identity implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ImpersonationToken.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java
index 2b59dff97..7b210b7fe 100644
--- a/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/ImportStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ImportStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java
index 7bde3af2d..07c1e1d46 100644
--- a/src/main/java/org/gitlab4j/api/models/ImportStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ImportStatus.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Issue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java
similarity index 90%
rename from src/main/java/org/gitlab4j/api/models/Issue.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java
index 0a38f328a..9c895ac70 100644
--- a/src/main/java/org/gitlab4j/api/models/Issue.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Issue.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Issue extends AbstractIssue {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/IssueEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEpic.java
similarity index 83%
rename from src/main/java/org/gitlab4j/api/models/IssueEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEpic.java
index f33506c76..2a47019fa 100644
--- a/src/main/java/org/gitlab4j/api/models/IssueEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEpic.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class IssueEpic extends AbstractMinimalEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/IssueEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/IssueEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java
index b4f3bc7d0..22eb7c74a 100644
--- a/src/main/java/org/gitlab4j/api/models/IssueEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueEvent.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/IssueFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/IssueFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java
index 137595113..0e50e8ef0 100644
--- a/src/main/java/org/gitlab4j/api/models/IssueFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueFilter.java
@@ -6,14 +6,14 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.Constants.IssueOrderBy;
-import org.gitlab4j.api.Constants.IssueScope;
-import org.gitlab4j.api.Constants.IssueState;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.ISO8601;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.Constants.IssueOrderBy;
+import org.gitlab4j.models.Constants.IssueScope;
+import org.gitlab4j.models.Constants.IssueState;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -31,7 +31,7 @@ public class IssueFilter implements Serializable {
private List iids;
/**
- * {@link org.gitlab4j.api.Constants.IssueState} Return all issues or just those that are opened or closed.
+ * {@link org.gitlab4j.models.Constants.IssueState} Return all issues or just those that are opened or closed.
*/
private IssueState state;
@@ -51,7 +51,7 @@ public class IssueFilter implements Serializable {
private String milestone;
/**
- * {@link org.gitlab4j.api.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.
+ * {@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.
*/
private IssueScope scope;
@@ -71,12 +71,12 @@ public class IssueFilter implements Serializable {
private String myReactionEmoji;
/**
- * {@link org.gitlab4j.api.Constants.IssueOrderBy} Return issues ordered by created_at or updated_at fields. Default is created_at.
+ * {@link org.gitlab4j.models.Constants.IssueOrderBy} Return issues ordered by created_at or updated_at fields. Default is created_at.
*/
private IssueOrderBy orderBy;
/**
- * {@link org.gitlab4j.api.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.
*/
private SortOrder sort;
@@ -499,13 +499,13 @@ public IssueFilter withoutMilestone(String milestone) {
/*- params generator -*/
@JsonIgnore
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("iids", iids)
.withParam("state", state)
.withParam("labels", (labels != null ? String.join(",", labels) : null))
diff --git a/src/main/java/org/gitlab4j/api/models/IssueLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/IssueLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java
index 1cc93fd39..a62b39830 100644
--- a/src/main/java/org/gitlab4j/api/models/IssueLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssueLink.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class IssueLink implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/IssuesStatistics.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java
index c01916996..f547e25fb 100644
--- a/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatistics.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java
index 452161eea..ee328e96b 100644
--- a/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java
@@ -4,10 +4,9 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants.IssueScope;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.ISO8601;
+import org.gitlab4j.models.Constants.IssueScope;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -103,9 +102,9 @@ public IssuesStatisticsFilter withConfidential(Boolean confidential) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams() throws GitLabApiException {
+ public GitLabForm getQueryParams() {
- return (new GitLabApiForm()
+ return (new GitLabForm()
.withParam("labels", (labels != null ? String.join(",", labels) : null))
.withParam("iids", iids)
.withParam("milestone", milestone)
diff --git a/src/main/java/org/gitlab4j/api/models/Iteration.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Iteration.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java
index 97976018e..adcad5805 100644
--- a/src/main/java/org/gitlab4j/api/models/Iteration.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Iteration.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/IterationFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/IterationFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java
index b36cfb382..bcb5d9176 100644
--- a/src/main/java/org/gitlab4j/api/models/IterationFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/IterationFilter.java
@@ -3,10 +3,10 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.ISO8601;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.ISO8601;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -173,13 +173,13 @@ public IterationFilter withUpdatedBefore(Date updatedBefore) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- return new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return new GitLabForm()
.withParam("state", state)
.withParam("search", search)
.withParam("in", in)
diff --git a/src/main/java/org/gitlab4j/api/models/Job.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/Job.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java
index 22060402e..151321d98 100644
--- a/src/main/java/org/gitlab4j/api/models/Job.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Job.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Job implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/JobAttribute.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/JobAttribute.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java
index 345a1627b..cd95e2157 100644
--- a/src/main/java/org/gitlab4j/api/models/JobAttribute.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttribute.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class JobAttribute implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/JobAttributes.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttributes.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/JobAttributes.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttributes.java
index 5ebe3efe1..6679750b6 100644
--- a/src/main/java/org/gitlab4j/api/models/JobAttributes.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobAttributes.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/JobStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobStatus.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/JobStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobStatus.java
index f494ed5a8..731203072 100644
--- a/src/main/java/org/gitlab4j/api/models/JobStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/JobStatus.java
@@ -23,7 +23,7 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Key.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Key.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java
index c585eef78..6d936c66c 100644
--- a/src/main/java/org/gitlab4j/api/models/Key.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Key.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Key implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Label.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Label.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java
index 6f5614a94..e71d6f287 100644
--- a/src/main/java/org/gitlab4j/api/models/Label.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Label.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -142,8 +142,8 @@ public String toString() {
* @return a GitLabApiForm instance holding the form parameters for this LabelParams instance
*/
@JsonIgnore
- public GitLabApiForm getForm(boolean isCreate) {
- GitLabApiForm form = new GitLabApiForm()
+ public GitLabForm getForm(boolean isCreate) {
+ GitLabForm form = new GitLabForm()
.withParam("description", description)
.withParam("color", color, isCreate)
.withParam("priority", priority);
diff --git a/src/main/java/org/gitlab4j/api/models/LabelEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/LabelEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java
index 5e4ff562e..3a5f0dbe7 100644
--- a/src/main/java/org/gitlab4j/api/models/LabelEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LabelEvent.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/LdapGroupLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java
index bbf666047..cd782c6c2 100644
--- a/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LdapGroupLink.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class LdapGroupLink implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/License.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/License.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java
index 4c7740ef4..7cff0f42f 100644
--- a/src/main/java/org/gitlab4j/api/models/License.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/License.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class License implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/LicenseTemplate.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java
index c658f082c..4958a030f 100644
--- a/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LicenseTemplate.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class LicenseTemplate implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Link.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Link.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java
index 4adabc594..ba6369af9 100644
--- a/src/main/java/org/gitlab4j/api/models/Link.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Link.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Link implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/LinkType.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkType.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/LinkType.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkType.java
index 18f2fda3b..d1b4297f7 100644
--- a/src/main/java/org/gitlab4j/api/models/LinkType.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkType.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/LinkedIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/LinkedIssue.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java
index 173a59c8f..4b668a5aa 100644
--- a/src/main/java/org/gitlab4j/api/models/LinkedIssue.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class LinkedIssue extends AbstractIssue {
diff --git a/src/main/java/org/gitlab4j/api/models/Markdown.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java
similarity index 90%
rename from src/main/java/org/gitlab4j/api/models/Markdown.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java
index d5c3caa96..c5c6fd1aa 100644
--- a/src/main/java/org/gitlab4j/api/models/Markdown.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Markdown.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Markdown implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/MarkdownRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MarkdownRequest.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/MarkdownRequest.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MarkdownRequest.java
diff --git a/src/main/java/org/gitlab4j/api/models/Member.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Member.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java
index 6be7ba8a3..816e7dc3f 100644
--- a/src/main/java/org/gitlab4j/api/models/Member.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Member.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Member extends AbstractUser {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Membership.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Membership.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java
index cb0334c92..dfec530e5 100644
--- a/src/main/java/org/gitlab4j/api/models/Membership.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Membership.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Membership implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/MembershipSourceType.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MembershipSourceType.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/MembershipSourceType.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MembershipSourceType.java
index 99096d3bb..edd32112c 100644
--- a/src/main/java/org/gitlab4j/api/models/MembershipSourceType.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MembershipSourceType.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/MergeRequest.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java
index 056203350..3020d9447 100644
--- a/src/main/java/org/gitlab4j/api/models/MergeRequest.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequest.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java
index bb62a7457..2c3a52f75 100644
--- a/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java
@@ -2,7 +2,7 @@
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class MergeRequestDiff extends MergeRequestVersion {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
index 38923f980..c3d13fab9 100644
--- a/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.models;
-import static org.gitlab4j.api.Constants.MergeRequestScope.ALL;
-import static org.gitlab4j.api.Constants.MergeRequestScope.ASSIGNED_TO_ME;
+import static org.gitlab4j.models.Constants.MergeRequestScope.ALL;
+import static org.gitlab4j.models.Constants.MergeRequestScope.ASSIGNED_TO_ME;
import java.io.Serializable;
import java.util.Date;
@@ -9,15 +9,15 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.Constants.MergeRequestOrderBy;
-import org.gitlab4j.api.Constants.MergeRequestScope;
-import org.gitlab4j.api.Constants.MergeRequestSearchIn;
-import org.gitlab4j.api.Constants.MergeRequestState;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.Constants.MergeRequestOrderBy;
+import org.gitlab4j.models.Constants.MergeRequestScope;
+import org.gitlab4j.models.Constants.MergeRequestSearchIn;
+import org.gitlab4j.models.Constants.MergeRequestState;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -491,13 +491,13 @@ public MergeRequestFilter withoutLabels(String... labels) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- GitLabApiForm params = new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ GitLabForm params = new GitLabForm()
.withParam("iids", iids)
.withParam("state", state)
.withParam("order_by", orderBy)
diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/MergeRequestParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java
index ce00219fe..5d9f93864 100644
--- a/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java
@@ -4,8 +4,8 @@
import java.util.Arrays;
import java.util.List;
-import org.gitlab4j.api.Constants.StateEvent;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.Constants.StateEvent;
+import org.gitlab4j.models.GitLabForm;
/**
* This class provides the form parameters for creating and updating merge requests.
@@ -227,9 +227,9 @@ public MergeRequestParams withApprovalsBeforeMerge(Integer approvalsBeforeMerge)
* set to false if this is for an update merge request
* @return a GitLabApiForm instance holding the form parameters for this MergeRequestParams instance
*/
- public GitLabApiForm getForm(boolean isCreate) {
+ public GitLabForm getForm(boolean isCreate) {
- GitLabApiForm form = new GitLabApiForm()
+ GitLabForm form = new GitLabForm()
.withParam("target_branch", targetBranch, isCreate)
.withParam("title", title, isCreate)
.withParam("assignee_id", assigneeId)
diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java
index 016afd372..3e60b79e3 100644
--- a/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/MergeRequestVersion.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class MergeRequestVersion implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Metadata.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Metadata.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java
index 91e6eef88..35d42e878 100644
--- a/src/main/java/org/gitlab4j/api/models/Metadata.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/Milestone.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Milestone.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java
index 3c4939dae..eaeff6293 100644
--- a/src/main/java/org/gitlab4j/api/models/Milestone.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Milestone.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/Namespace.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Namespace.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java
index 111c38eca..4141f50dd 100644
--- a/src/main/java/org/gitlab4j/api/models/Namespace.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Namespace.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Namespace implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Note.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Note.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java
index 4b090804f..a76ba4ed4 100644
--- a/src/main/java/org/gitlab4j/api/models/Note.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Note.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/NotificationSettings.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/NotificationSettings.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java
index c70ba9fd3..56d25c0ae 100644
--- a/src/main/java/org/gitlab4j/api/models/NotificationSettings.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/NotificationSettings.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/OauthTokenResponse.java
diff --git a/src/main/java/org/gitlab4j/api/models/Owner.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Owner.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Owner.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Owner.java
diff --git a/src/main/java/org/gitlab4j/api/models/Package.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Package.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java
index eddf580f7..a69e9fde8 100644
--- a/src/main/java/org/gitlab4j/api/models/Package.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Package.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Package implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PackageFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/PackageFile.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java
index 352f21ec4..b9c889561 100644
--- a/src/main/java/org/gitlab4j/api/models/PackageFile.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFile.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class PackageFile implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PackageFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/PackageFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java
index 4f824fd80..5efaa2d9b 100644
--- a/src/main/java/org/gitlab4j/api/models/PackageFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageFilter.java
@@ -2,10 +2,10 @@
import java.io.Serializable;
-import org.gitlab4j.api.Constants.PackageOrderBy;
-import org.gitlab4j.api.Constants.PackageStatus;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.Constants.PackageOrderBy;
+import org.gitlab4j.models.Constants.PackageStatus;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
/**
* This class is used to filter Projects when getting lists of projects for a specified group.
@@ -111,8 +111,8 @@ public PackageFilter withPackageVersion(String packageVersion) {
*
* @return a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
*/
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("order_by", orderBy)
.withParam("sort", sort)
.withParam("exclude_subgroups", excludeSubgroups)
diff --git a/src/main/java/org/gitlab4j/api/models/PackageType.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageType.java
similarity index 92%
rename from src/main/java/org/gitlab4j/api/models/PackageType.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageType.java
index 55faf93e6..13159c267 100644
--- a/src/main/java/org/gitlab4j/api/models/PackageType.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PackageType.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Participant.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Participant.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Participant.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Participant.java
diff --git a/src/main/java/org/gitlab4j/api/models/Permissions.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/Permissions.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java
index cf05cc5ec..f925f6cd7 100644
--- a/src/main/java/org/gitlab4j/api/models/Permissions.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Permissions.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Permissions implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java
index fa4c6c98f..46b53a3ef 100644
--- a/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PersonalAccessToken.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/Pipeline.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Pipeline.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java
index c5f022fb7..682c28743 100644
--- a/src/main/java/org/gitlab4j/api/models/Pipeline.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Pipeline.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Pipeline implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PipelineFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java
similarity index 80%
rename from src/main/java/org/gitlab4j/api/models/PipelineFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java
index 9f3e6350d..0f87fd6ef 100644
--- a/src/main/java/org/gitlab4j/api/models/PipelineFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineFilter.java
@@ -3,12 +3,12 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants.PipelineOrderBy;
-import org.gitlab4j.api.Constants.PipelineScope;
-import org.gitlab4j.api.Constants.PipelineSource;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.PipelineOrderBy;
+import org.gitlab4j.models.Constants.PipelineScope;
+import org.gitlab4j.models.Constants.PipelineSource;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -18,13 +18,13 @@
public class PipelineFilter implements Serializable {
private static final long serialVersionUID = 1L;
- /** {@link org.gitlab4j.api.Constants.PipelineScope} The scope of pipelines, one of: running, pending, finished, branches, tags */
+ /** {@link org.gitlab4j.models.Constants.PipelineScope} The scope of pipelines, one of: running, pending, finished, branches, tags */
private PipelineScope scope;
- /** {@link org.gitlab4j.api.Constants.PipelineScope} The status of pipelines, one of: running, pending, success, failed, canceled, skipped, created */
+ /** {@link org.gitlab4j.models.Constants.PipelineScope} The status of pipelines, one of: running, pending, success, failed, canceled, skipped, created */
private PipelineStatus status;
- /** {@link org.gitlab4j.api.Constants.PipelineSource} The source of pipelines */
+ /** {@link org.gitlab4j.models.Constants.PipelineSource} The source of pipelines */
private PipelineSource source;
/** The ref of pipelines. */
@@ -49,12 +49,12 @@ public class PipelineFilter implements Serializable {
private Date updatedBefore;
/**
- * {@link org.gitlab4j.api.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).
*/
private PipelineOrderBy orderBy;
/**
- * {@link org.gitlab4j.api.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.
*/
private SortOrder sort;
@@ -167,8 +167,8 @@ public PipelineFilter withSort(SortOrder sort) {
}
@JsonIgnore
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("scope", scope)
.withParam("status", status)
.withParam("source", source)
diff --git a/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/PipelineSchedule.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java
index 708d28b3b..b5f2e9909 100644
--- a/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class PipelineSchedule implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PipelineStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineStatus.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/PipelineStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PipelineStatus.java
diff --git a/src/main/java/org/gitlab4j/api/models/Position.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Position.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java
index d8ac5382d..f68446611 100644
--- a/src/main/java/org/gitlab4j/api/models/Position.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Position.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/Project.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Project.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java
index e9f3631c8..89d1d52ff 100644
--- a/src/main/java/org/gitlab4j/api/models/Project.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java
@@ -5,13 +5,12 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.Constants.AutoDevopsDeployStrategy;
-import org.gitlab4j.api.Constants.BuildGitStrategy;
-import org.gitlab4j.api.Constants.SquashOption;
-import org.gitlab4j.api.ProjectLicense;
import org.gitlab4j.api.models.ImportStatus.Status;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.Constants.AutoDevopsDeployStrategy;
+import org.gitlab4j.models.Constants.BuildGitStrategy;
+import org.gitlab4j.models.Constants.SquashOption;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectAccess.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/ProjectAccess.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java
index bcbaab696..40d952863 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectAccess.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccess.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProjectAccess implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
index ec1b953ed..44b6c93e8 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
@@ -4,8 +4,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProjectAccessToken implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
index e60ec8c90..25b14bc56 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -116,8 +116,8 @@ public ProjectApprovalsConfig withRequirePasswordToApprove(Boolean requirePasswo
* @return a GitLabApiForm instance holding the form parameters for this ProjectApprovalsConfig instance
*/
@JsonIgnore
- public GitLabApiForm getForm() {
- return new GitLabApiForm()
+ public GitLabForm getForm() {
+ return new GitLabForm()
.withParam("approvals_before_merge", approvalsBeforeMerge)
.withParam("reset_approvals_on_push", resetApprovalsOnPush)
.withParam("selective_code_owner_removals", selectiveCodeOwnerRemovals)
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectFetches.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ProjectFetches.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java
index 85f9c56e3..0ff707fd5 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectFetches.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFetches.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ProjectFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java
index dd7315bea..94cec0ca2 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectFilter.java
@@ -3,11 +3,11 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants;
-import org.gitlab4j.api.Constants.ProjectOrderBy;
-import org.gitlab4j.api.Constants.SortOrder;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants;
+import org.gitlab4j.models.Constants.ProjectOrderBy;
+import org.gitlab4j.models.Constants.SortOrder;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class is used to filter Projects when getting lists of projects for a specified user.
@@ -338,7 +338,7 @@ public ProjectFilter withTopicId(Integer topic_id) {
* @param perPage specifies the number of items per page
* @return a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
*/
- public GitLabApiForm getQueryParams(int page, int perPage) {
+ public GitLabForm getQueryParams(int page, int perPage) {
return (getQueryParams().withParam(Constants.PAGE_PARAM, page).withParam(Constants.PER_PAGE_PARAM, perPage));
}
@@ -347,8 +347,8 @@ public GitLabApiForm getQueryParams(int page, int perPage) {
*
* @return a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
*/
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("archived", archived)
.withParam("visibility", visibility)
.withParam("order_by", orderBy)
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroup.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/ProjectGroup.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroup.java
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java
index 4c43039fd..44b21913e 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectGroupsFilter.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
/**
* This class is used to filter Groups when getting lists of groups for a specified project.
@@ -77,8 +77,8 @@ public ProjectGroupsFilter withWithShared(Boolean withShared) {
*
* @return a GitLabApiForm instance holding the query parameters for this ProjectGroupsFilter instance
*/
- public GitLabApiForm getQueryParams() {
- return (new GitLabApiForm()
+ public GitLabForm getQueryParams() {
+ return (new GitLabForm()
.withParam("search", search)
.withParam("shared_min_access_level", sharedMinAccessLevel)
.withParam("shared_visible_only", sharedVisibleOnly)
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/ProjectHook.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java
index 13cc5b31e..c3ce5f293 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectHook.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectHook.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProjectHook implements Serializable {
private static final long serialVersionUID = 1L;
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
new file mode 100644
index 000000000..553d9f181
--- /dev/null
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectLicense.java
@@ -0,0 +1,57 @@
+package org.gitlab4j.api.models;
+
+import org.gitlab4j.models.utils.JacksonJson;
+
+public class ProjectLicense {
+
+ private String key;
+ private String name;
+ private String nickname;
+ private String htmlUrl;
+ private String sourceUrl;
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getNickname() {
+ return nickname;
+ }
+
+ public void setNickname(String nickname) {
+ this.nickname = nickname;
+ }
+
+ public String getHtmlUrl() {
+ return htmlUrl;
+ }
+
+ public void setHtmlUrl(String htmlUrl) {
+ this.htmlUrl = htmlUrl;
+ }
+
+ public String getSourceUrl() {
+ return sourceUrl;
+ }
+
+ public void setSourceUrl(String sourceUrl) {
+ this.sourceUrl = sourceUrl;
+ }
+
+ @Override
+ public String toString() {
+ return (JacksonJson.toJsonString(this));
+ }
+}
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ProjectStatistics.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java
index ef2ee0749..d622a229a 100644
--- a/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectStatistics.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* This class contains the sizing information from the project. To get this information,
diff --git a/src/main/java/org/gitlab4j/api/models/ProjectUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectUser.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/ProjectUser.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProjectUser.java
diff --git a/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
index 808fc13df..947fecf16 100644
--- a/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProtectedBranch implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/ProtectedTag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/ProtectedTag.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java
index 7c932c7be..46760a060 100644
--- a/src/main/java/org/gitlab4j/api/models/ProtectedTag.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ProtectedTag.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProtectedTag implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/PushData.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/PushData.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java
index 106de68f2..e0c14876e 100644
--- a/src/main/java/org/gitlab4j/api/models/PushData.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushData.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.Constants.ActionType;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.ActionType;
+import org.gitlab4j.models.utils.JacksonJson;
public class PushData {
diff --git a/src/main/java/org/gitlab4j/api/models/PushRules.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/PushRules.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java
index 40ae78eda..b94b4af74 100644
--- a/src/main/java/org/gitlab4j/api/models/PushRules.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/PushRules.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class PushRules implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/References.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/References.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java
index a17a149c8..c20841dbc 100644
--- a/src/main/java/org/gitlab4j/api/models/References.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/References.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/RegistryRepository.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/RegistryRepository.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java
index f927b278d..c6d79e794 100644
--- a/src/main/java/org/gitlab4j/api/models/RegistryRepository.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepository.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RegistryRepository implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java
index 724a4d7b9..721df1243 100644
--- a/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RegistryRepositoryTag.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RegistryRepositoryTag implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/RelatedEpic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/RelatedEpic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java
index a574473f1..92671519f 100644
--- a/src/main/java/org/gitlab4j/api/models/RelatedEpic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpic.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RelatedEpic extends AbstractEpic {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java
index 4e4e43b0c..319c3cc1a 100644
--- a/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RelatedEpicLink.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RelatedEpicLink implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Release.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Release.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java
index e7d73680f..1df5d272c 100644
--- a/src/main/java/org/gitlab4j/api/models/Release.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Release.java
@@ -5,7 +5,7 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java
index ac26d4514..a308cca96 100644
--- a/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseLinkParams.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ReleaseLinkParams {
diff --git a/src/main/java/org/gitlab4j/api/models/ReleaseParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/ReleaseParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java
index dd87799d7..00e7c339a 100644
--- a/src/main/java/org/gitlab4j/api/models/ReleaseParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ReleaseParams.java
@@ -4,7 +4,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ReleaseParams implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/RemoteMirror.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/RemoteMirror.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java
index 95ab887af..3075ac680 100644
--- a/src/main/java/org/gitlab4j/api/models/RemoteMirror.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RemoteMirror.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RemoteMirror implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Repository.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Repository.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java
index 0ed5fe290..133c5b65a 100644
--- a/src/main/java/org/gitlab4j/api/models/Repository.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Repository.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Repository implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java
similarity index 84%
rename from src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java
index d897a9709..f241de6cd 100644
--- a/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryArchiveParams.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
/**
* Params for getting file archive of the repository.
@@ -37,7 +37,7 @@ public RepositoryArchiveParams withPath(String path) {
*
* @return form with params
*/
- public GitLabApiForm getForm() {
- return new GitLabApiForm().withParam("sha", sha).withParam("path", path);
+ public GitLabForm getForm() {
+ return new GitLabForm().withParam("sha", sha).withParam("path", path);
}
}
diff --git a/src/main/java/org/gitlab4j/api/models/RepositoryFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/RepositoryFile.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java
index e0cca104b..87c7e7db7 100644
--- a/src/main/java/org/gitlab4j/api/models/RepositoryFile.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFile.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Base64;
-import org.gitlab4j.api.Constants.Encoding;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.Encoding;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java
index 4a059dfd5..92387e9ef 100644
--- a/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RepositoryFileResponse.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RepositoryFileResponse implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Reviewer.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Reviewer.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Reviewer.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Reviewer.java
diff --git a/src/main/java/org/gitlab4j/api/models/Runner.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/Runner.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java
index bc3649a78..78c50a4e4 100644
--- a/src/main/java/org/gitlab4j/api/models/Runner.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Runner.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/RunnerDetail.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/RunnerDetail.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java
index 7f9645449..1d88fb014 100644
--- a/src/main/java/org/gitlab4j/api/models/RunnerDetail.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/RunnerDetail.java
@@ -3,8 +3,8 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/SamlGroupLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java
index 213728a8b..72f80a4f6 100644
--- a/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SamlGroupLink.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class SamlGroupLink implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/SearchBlob.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/SearchBlob.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java
index 2d0fbd0bb..ecbc6dd93 100644
--- a/src/main/java/org/gitlab4j/api/models/SearchBlob.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SearchBlob.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class SearchBlob implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Setting.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Setting.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/Setting.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Setting.java
index 781f9dabb..a29aa5d89 100644
--- a/src/main/java/org/gitlab4j/api/models/Setting.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Setting.java
@@ -3,8 +3,7 @@
import java.lang.reflect.Array;
import java.util.HashMap;
-import org.gitlab4j.api.GitLabApiException;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -2218,9 +2217,9 @@ public final boolean isValid(Object value) {
* Will throw a GitLabApiException if the value is not of the correct type.
*
* @param value the value to validate
- * @throws GitLabApiException if the provided value is not a valid type for the ApplicationSetting
+ * @throws IllegalStateException if the provided value is not a valid type for the ApplicationSetting
*/
- public final void validate(Object value) throws GitLabApiException {
+ public final void validate(Object value) {
if (isValid(value)) {
return;
@@ -2239,7 +2238,7 @@ public final void validate(Object value) throws GitLabApiException {
String errorMsg = String.format(
"'%s' value is of incorrect type, is %s, should be %s",
toValue(), value.getClass().getSimpleName(), shouldBe.toString());
- throw new GitLabApiException(errorMsg);
+ throw new IllegalStateException(errorMsg);
}
public Object emptyArrayValue() {
diff --git a/src/main/java/org/gitlab4j/api/models/SharedGroup.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/SharedGroup.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java
index 023c969c9..033812eb6 100644
--- a/src/main/java/org/gitlab4j/api/models/SharedGroup.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroup.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/src/main/java/org/gitlab4j/api/models/Snippet.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/Snippet.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java
index 7f8137b73..93e03c908 100644
--- a/src/main/java/org/gitlab4j/api/models/Snippet.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Snippet.java
@@ -26,7 +26,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Snippet implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/SshKey.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/SshKey.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java
index 0ebfd224e..971cbf43e 100644
--- a/src/main/java/org/gitlab4j/api/models/SshKey.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SshKey.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/src/main/java/org/gitlab4j/api/models/SystemHook.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/SystemHook.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java
index 7085e2b11..c04e51054 100644
--- a/src/main/java/org/gitlab4j/api/models/SystemHook.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SystemHook.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class SystemHook implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Tag.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Tag.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java
index c3d74d519..d391ac8a2 100644
--- a/src/main/java/org/gitlab4j/api/models/Tag.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Tag.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Tag implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java
index f1ff83295..112679978 100644
--- a/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TaskCompletionStatus.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class TaskCompletionStatus implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/TimeStats.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/TimeStats.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java
index 767377c11..83bf7b3bc 100644
--- a/src/main/java/org/gitlab4j/api/models/TimeStats.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TimeStats.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class TimeStats implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Todo.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/models/Todo.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java
index e5194fa2e..31dd036f2 100644
--- a/src/main/java/org/gitlab4j/api/models/Todo.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Todo.java
@@ -4,10 +4,10 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.Constants.TodoAction;
-import org.gitlab4j.api.Constants.TodoState;
-import org.gitlab4j.api.Constants.TodoType;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.Constants.TodoAction;
+import org.gitlab4j.models.Constants.TodoState;
+import org.gitlab4j.models.Constants.TodoType;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.JsonParser;
diff --git a/src/main/java/org/gitlab4j/api/models/Topic.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Topic.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java
index dd96dc7f8..9bcdfbbd8 100644
--- a/src/main/java/org/gitlab4j/api/models/Topic.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Topic.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Topic implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/TopicParams.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java
similarity index 73%
rename from src/main/java/org/gitlab4j/api/models/TopicParams.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java
index 2b9bcab18..4acf16ab5 100644
--- a/src/main/java/org/gitlab4j/api/models/TopicParams.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TopicParams.java
@@ -1,17 +1,15 @@
package org.gitlab4j.api.models;
-import java.io.File;
import java.io.Serializable;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.TopicsApi;
+import org.gitlab4j.models.GitLabForm;
/**
- * This class is utilized by the {@link TopicsApi#createTopic(TopicParams)}
- * and {@link TopicsApi#updateTopic(Integer, TopicParams)} methods to set
+ * This class is utilized by the org.gitlab4j.api.TopicsApi#createTopic(TopicParams)
+ * and org.gitlab4j.api.TopicsApi#updateTopic(Integer, TopicParams)
methods to set
* the parameters for the call to the GitLab API.
*
- * Avatar Upload has its own Upload in {@link TopicsApi#updateTopicAvatar(Integer,File)}
+ * Avatar Upload has its own Upload in org.gitlab4j.api.TopicsApi#updateTopicAvatar(Integer,File)
*/
public class TopicParams implements Serializable {
private static final long serialVersionUID = 1L;
@@ -42,9 +40,9 @@ public TopicParams withDescription(String description) {
* @return a GitLabApiForm instance holding the parameters for the group create or update operation
* @throws RuntimeException if required parameters are missing
*/
- public GitLabApiForm getForm(boolean isCreate) {
+ public GitLabForm getForm(boolean isCreate) {
- GitLabApiForm form = new GitLabApiForm()
+ GitLabForm form = new GitLabForm()
.withParam("name", name, isCreate)
.withParam("title", title, isCreate)
.withParam("description", description);
diff --git a/src/main/java/org/gitlab4j/api/models/TreeItem.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/TreeItem.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java
index 3cb42f013..89745a61c 100644
--- a/src/main/java/org/gitlab4j/api/models/TreeItem.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/TreeItem.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class TreeItem implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Trigger.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/models/Trigger.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Trigger.java
diff --git a/src/main/java/org/gitlab4j/api/models/UploadedByUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/models/UploadedByUser.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java
index 5e641ca2a..f97d29002 100644
--- a/src/main/java/org/gitlab4j/api/models/UploadedByUser.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedByUser.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class UploadedByUser implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/UploadedFile.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/UploadedFile.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java
index 9960d1aa7..f0a594179 100644
--- a/src/main/java/org/gitlab4j/api/models/UploadedFile.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/UploadedFile.java
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class UploadedFile implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/User.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/models/User.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java
index 3f3e04bcb..04d28ab88 100644
--- a/src/main/java/org/gitlab4j/api/models/User.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/User.java
@@ -3,7 +3,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class User extends AbstractUser {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Variable.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Variable.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java
index 37c918410..3c7160572 100644
--- a/src/main/java/org/gitlab4j/api/models/Variable.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Variable.java
@@ -5,8 +5,8 @@
import java.util.List;
import java.util.Map;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/gitlab4j/api/models/Version.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/models/Version.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java
index 1139690aa..e2e60644e 100644
--- a/src/main/java/org/gitlab4j/api/models/Version.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Version.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class Version implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/Visibility.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Visibility.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/models/Visibility.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/Visibility.java
index e07af0f5d..e0304d600 100644
--- a/src/main/java/org/gitlab4j/api/models/Visibility.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Visibility.java
@@ -23,7 +23,7 @@
package org.gitlab4j.api.models;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/models/WikiAttachment.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/models/WikiAttachment.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java
index eb5db0a38..c4b386459 100644
--- a/src/main/java/org/gitlab4j/api/models/WikiAttachment.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiAttachment.java
@@ -2,7 +2,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class WikiAttachment implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/models/WikiPage.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/models/WikiPage.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java
index 842c32cfc..f645e5e1b 100644
--- a/src/main/java/org/gitlab4j/api/models/WikiPage.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/WikiPage.java
@@ -25,7 +25,7 @@
import java.io.Serializable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class WikiPage implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/services/BugzillaService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/BugzillaService.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/services/BugzillaService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/BugzillaService.java
index 96bab6d33..72032756c 100644
--- a/src/main/java/org/gitlab4j/api/services/BugzillaService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/BugzillaService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class BugzillaService extends NotificationService {
@@ -10,8 +10,8 @@ public class BugzillaService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam(DESCRIPTION_PROP, getDescription())
.withParam(ISSUES_URL_PROP, getIssuesUrl(), true)
.withParam(NEW_ISSUE_URL_PROP, getNewIssueUrl(), true)
diff --git a/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
index 3f8ed6dac..a39cae7de 100644
--- a/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class CustomIssueTrackerService extends NotificationService {
@@ -10,8 +10,8 @@ public class CustomIssueTrackerService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam(DESCRIPTION_PROP, getDescription())
.withParam(ISSUES_URL_PROP, getIssuesUrl(), true)
.withParam(NEW_ISSUE_URL_PROP, getNewIssueUrl(), true)
diff --git a/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/services/EmailOnPushService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java
index dcfd71505..7c79317dd 100644
--- a/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -11,8 +11,8 @@ public class EmailOnPushService extends NotificationService {
public static final String SEND_FROM_COMMITTER_EMAIL_PROP = "send_from_committer_email";
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam(RECIPIENT_PROP, getRecipients(), true)
.withParam(DISABLE_DIFFS_PROP, getDisableDiffs())
.withParam(SEND_FROM_COMMITTER_EMAIL_PROP, getSendFromCommitterEmail())
diff --git a/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java
similarity index 78%
rename from src/main/java/org/gitlab4j/api/services/ExternalWikiService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java
index 43be61297..989a1a079 100644
--- a/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
public class ExternalWikiService extends NotificationService {
@@ -12,8 +12,8 @@ public class ExternalWikiService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm().withParam("external_wiki_url", getExternalWikiUrl(), true);
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm().withParam("external_wiki_url", getExternalWikiUrl(), true);
return formData;
}
diff --git a/src/main/java/org/gitlab4j/api/services/HipChatService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/HipChatService.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/services/HipChatService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/HipChatService.java
index 2c8bc71f6..460e2b323 100644
--- a/src/main/java/org/gitlab4j/api/services/HipChatService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/HipChatService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -20,8 +20,8 @@ public class HipChatService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam("push_events", getPushEvents())
.withParam("issues_events", getIssuesEvents())
.withParam("confidential_issues_events", getConfidentialIssuesEvents())
diff --git a/src/main/java/org/gitlab4j/api/services/JiraService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/JiraService.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/services/JiraService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/JiraService.java
index a2346f659..a5abc2f70 100644
--- a/src/main/java/org/gitlab4j/api/services/JiraService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/JiraService.java
@@ -2,7 +2,7 @@
import java.util.Map;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -23,8 +23,8 @@ public class JiraService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam("merge_requests_events", getMergeRequestsEvents())
.withParam(COMMIT_EVENTS_PROP, getCommitEvents())
.withParam(URL_PROP, getUrl(), true)
diff --git a/src/main/java/org/gitlab4j/api/services/MattermostService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/MattermostService.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/services/MattermostService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/MattermostService.java
index 6a0f0df8f..b134907c8 100644
--- a/src/main/java/org/gitlab4j/api/services/MattermostService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/MattermostService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -14,8 +14,8 @@ public class MattermostService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam("webhook", getWebhook(), true)
.withParam("username", getUsername())
.withParam("channel", getDefaultChannel())
diff --git a/src/main/java/org/gitlab4j/api/services/NotificationService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/NotificationService.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/services/NotificationService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/NotificationService.java
index bddebf158..77c39db05 100644
--- a/src/main/java/org/gitlab4j/api/services/NotificationService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/NotificationService.java
@@ -5,8 +5,8 @@
import java.util.HashMap;
import java.util.Map;
-import org.gitlab4j.api.GitLabApiForm;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.GitLabForm;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -56,7 +56,7 @@ public abstract class NotificationService implements Serializable {
private Map properties;
- public abstract GitLabApiForm servicePropertiesForm();
+ public abstract GitLabForm servicePropertiesForm();
public Long getId() {
return id;
diff --git a/src/main/java/org/gitlab4j/api/services/SlackService.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/SlackService.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/services/SlackService.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/services/SlackService.java
index bdd9e406d..2b20f4d7d 100644
--- a/src/main/java/org/gitlab4j/api/services/SlackService.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/services/SlackService.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.services;
-import org.gitlab4j.api.GitLabApiForm;
+import org.gitlab4j.models.GitLabForm;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -15,8 +15,8 @@ public class SlackService extends NotificationService {
* @return the form data for this service based on it's properties
*/
@Override
- public GitLabApiForm servicePropertiesForm() {
- GitLabApiForm formData = new GitLabApiForm()
+ public GitLabForm servicePropertiesForm() {
+ GitLabForm formData = new GitLabForm()
.withParam("webhook", getWebhook(), true)
.withParam("username", getUsername())
.withParam("channel", getDefaultChannel())
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/AbstractSystemHookEvent.java
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
index f00215a13..c85a5db2a 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
index 92378f7dd..04af93545 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class GroupSystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
index 9de48e9f5..1c31a0cdc 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class KeySystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/MergeRequestSystemHookEvent.java
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
index f6a88e462..ef832ae9d 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
@@ -3,7 +3,7 @@
import java.util.Date;
import org.gitlab4j.api.models.Visibility;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ProjectSystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
similarity index 89%
rename from src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
index bff70bffe..0efb8cc09 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.systemhooks;
-import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent;
+import org.gitlab4j.models.utils.JacksonJson;
public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
index a59a08b5f..b575b8932 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.systemhooks;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class RepositoryChange {
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
index 8788e32c7..9fd3ef3e6 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
@@ -2,8 +2,8 @@
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.EventProject;
+import org.gitlab4j.models.utils.JacksonJson;
public class RepositorySystemHookEvent extends AbstractSystemHookEvent {
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/SystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/SystemHookEvent.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/systemhooks/SystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/SystemHookEvent.java
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/SystemHookListener.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/SystemHookListener.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/systemhooks/SystemHookListener.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/SystemHookListener.java
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
similarity index 89%
rename from src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
index 021bd12ba..ecca3d70d 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.systemhooks;
-import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent;
+import org.gitlab4j.models.utils.JacksonJson;
public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
index 8673e0647..7e5ba0d33 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
@@ -3,7 +3,7 @@
import java.util.Date;
import org.gitlab4j.api.models.Visibility;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
index 8e91754bc..854755336 100644
--- a/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class UserSystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/AbstractEvent.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/webhook/BuildCommit.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java
index a6dfbcae8..3fe6cc83c 100644
--- a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class BuildCommit {
diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
index 0e954a107..ed2ad46c9 100644
--- a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
/**
* The documentation at:
diff --git a/src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java
index 9bd8c1d3b..4bb655d86 100644
--- a/src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ChangeContainer.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ChangeContainer {
diff --git a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java
index 151d306e6..5ae7875ed 100644
--- a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class DeploymentEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/Event.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/Event.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/Event.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/Event.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/EventChanges.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java
index bc40f7e9e..8b9c04882 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventChanges.java
@@ -6,7 +6,7 @@
import java.util.Map;
import org.gitlab4j.api.models.Assignee;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventCommit.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventCommit.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/webhook/EventCommit.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventCommit.java
index 55cfd689b..4547667f8 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventCommit.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventCommit.java
@@ -4,7 +4,7 @@
import java.util.List;
import org.gitlab4j.api.models.Author;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventCommit {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java
index 16feb98b1..edefee20b 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventExternalStatusCheck.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventExternalStatusCheck {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventIssue.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/EventIssue.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventIssue.java
index 27c4abf97..3873569fa 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventIssue.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventIssue {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventLabel.java
similarity index 96%
rename from src/main/java/org/gitlab4j/api/webhook/EventLabel.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventLabel.java
index c77b7db76..02d270d09 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventLabel.java
@@ -3,8 +3,8 @@
import java.io.Serializable;
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
index dbdd25c1e..17e336de5 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java
@@ -6,7 +6,7 @@
import org.gitlab4j.api.models.Assignee;
import org.gitlab4j.api.models.Duration;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventMergeRequest {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventProject.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventProject.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/EventProject.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventProject.java
index cccf45789..ed323caad 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventProject.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventProject.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.webhook;
import org.gitlab4j.api.models.AccessLevel;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventProject {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java
similarity index 94%
rename from src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java
index 7bd5cb51f..212100222 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseAssets.java
@@ -2,7 +2,7 @@
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventReleaseAssets {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java
index 2f3bc120a..d554ffb23 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventReleaseLink {
private Long id;
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java
similarity index 91%
rename from src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java
index 15862481c..5c0d26b7f 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventReleaseSource.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventReleaseSource {
private String format;
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventRepository.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventRepository.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/webhook/EventRepository.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventRepository.java
index b9915f614..5433349fe 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventRepository.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventRepository.java
@@ -1,7 +1,7 @@
package org.gitlab4j.api.webhook;
import org.gitlab4j.api.models.AccessLevel;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventRepository {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/webhook/EventSnippet.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java
index c81ed9bb9..3c6eb310c 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java
@@ -3,7 +3,7 @@
import java.util.Date;
import org.gitlab4j.api.models.AccessLevel;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventSnippet {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventUser.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventUser.java
similarity index 95%
rename from src/main/java/org/gitlab4j/api/webhook/EventUser.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventUser.java
index b45da199f..1462bdc54 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventUser.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventUser.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventUser {
diff --git a/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java
index d542e06cf..b59a209cf 100644
--- a/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventWorkItem.java
@@ -3,7 +3,7 @@
import java.util.Date;
import java.util.List;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class EventWorkItem {
diff --git a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java
index 5c7178930..aecad9281 100644
--- a/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ExternalStatusCheckEvent.java
@@ -4,8 +4,8 @@
import java.util.List;
import org.gitlab4j.api.models.Assignee;
-import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.MergeRequestEvent.ObjectAttributes;
+import org.gitlab4j.models.utils.JacksonJson;
public class ExternalStatusCheckEvent implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/IssueChanges.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/IssueChanges.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/IssueEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java
index 6d2d37db3..fded6d31b 100644
--- a/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/IssueEvent.java
@@ -3,7 +3,7 @@
import java.util.List;
import org.gitlab4j.api.models.Assignee;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class IssueEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/JobEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/JobEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/JobEvent.java
index 32c6e8705..1de27ffe1 100644
--- a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/JobEvent.java
@@ -2,7 +2,7 @@
import java.util.Date;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class JobEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/MergeRequestChanges.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java
index 667c06f80..dd59da228 100644
--- a/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/MergeRequestEvent.java
@@ -4,7 +4,7 @@
import org.gitlab4j.api.models.Assignee;
import org.gitlab4j.api.models.Reviewer;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class MergeRequestEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
index 62363d79f..84b395f82 100644
--- a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
@@ -3,8 +3,8 @@
import java.util.Date;
import org.gitlab4j.api.models.Diff;
-import org.gitlab4j.api.utils.JacksonJson;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
index 7dac2129d..44acf9d4b 100644
--- a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java
@@ -5,7 +5,7 @@
import org.gitlab4j.api.models.Job;
import org.gitlab4j.api.models.Variable;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class PipelineEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/PushEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PushEvent.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/webhook/PushEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PushEvent.java
index b48b5241b..6c5911fef 100644
--- a/src/main/java/org/gitlab4j/api/webhook/PushEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PushEvent.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class PushEvent extends AbstractPushEvent implements Event {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java
index 2fc16a702..aab4d39ee 100644
--- a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class ReleaseEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java
similarity index 93%
rename from src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java
index 2df516cee..432862738 100644
--- a/src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/TagPushEvent.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class TagPushEvent extends AbstractPushEvent implements Event {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/WebHookListener.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WebHookListener.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/WebHookListener.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WebHookListener.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java
similarity index 98%
rename from src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java
index 28b240042..60a3c3677 100644
--- a/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java
@@ -1,6 +1,6 @@
package org.gitlab4j.api.webhook;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class WikiPageEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java
similarity index 100%
rename from src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WorkItemChanges.java
diff --git a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java
similarity index 97%
rename from src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java
index 8d883d32d..cfa448ff4 100644
--- a/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WorkItemEvent.java
@@ -3,7 +3,7 @@
import java.util.List;
import org.gitlab4j.api.models.User;
-import org.gitlab4j.api.utils.JacksonJson;
+import org.gitlab4j.models.utils.JacksonJson;
public class WorkItemEvent extends AbstractEvent {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/org/gitlab4j/api/Constants.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/Constants.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java
index 270e8d6aa..840033bce 100644
--- a/src/main/java/org/gitlab4j/api/Constants.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api;
+package org.gitlab4j.models;
import java.util.Arrays;
import java.util.HashMap;
@@ -15,7 +15,7 @@
import org.gitlab4j.api.models.SearchBlob;
import org.gitlab4j.api.models.Snippet;
import org.gitlab4j.api.models.User;
-import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
+import org.gitlab4j.models.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -773,7 +773,7 @@ public enum ArchiveFormat {
valuesMap.put(archiveFormat.value, archiveFormat);
}
- public static ArchiveFormat forValue(String value) throws GitLabApiException {
+ public static ArchiveFormat forValue(String value) {
if (value == null || value.trim().isEmpty()) {
return (null);
@@ -784,7 +784,7 @@ public static ArchiveFormat forValue(String value) throws GitLabApiException {
return (archiveFormat);
}
- throw new GitLabApiException(
+ throw new IllegalArgumentException(
"Invalid format! Options are tar.gz, tar.bz2, tbz, tbz2, tb2, bz2, tar, and zip.");
}
diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/models/GitLabForm.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/GitLabForm.java
new file mode 100644
index 000000000..4b4b6cfa9
--- /dev/null
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/GitLabForm.java
@@ -0,0 +1,217 @@
+package org.gitlab4j.models;
+
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.gitlab4j.api.models.AccessLevel;
+import org.gitlab4j.api.models.Variable;
+import org.gitlab4j.models.utils.ISO8601;
+
+public class GitLabForm {
+
+ private Map formValues = new LinkedHashMap<>();
+
+ public GitLabForm() {
+ super();
+ }
+
+ /**
+ * Create a GitLabApiForm instance with the "page", and "per_page" parameters preset.
+ *
+ * @param page the value for the "page" parameter
+ * @param perPage the value for the "per_page" parameter
+ */
+ public GitLabForm(int page, int perPage) {
+ super();
+ withParam(Constants.PAGE_PARAM, page);
+ withParam(Constants.PER_PAGE_PARAM, (Integer) perPage);
+ }
+
+ /**
+ * Fluent method for adding query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param value the value of the field/attribute to add
+ * @return this GitLabAPiForm instance
+ */
+ public GitLabForm withParam(String name, Object value) throws IllegalArgumentException {
+ return (withParam(name, value, false));
+ }
+
+ /**
+ * Fluent method for adding Date query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param date the value of the field/attribute to add
+ * @return this GitLabAPiForm instance
+ */
+ public GitLabForm withParam(String name, Date date) throws IllegalArgumentException {
+ return (withParam(name, date, false));
+ }
+
+ /**
+ * Fluent method for adding Date query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param date the value of the field/attribute to add
+ * @param required the field is required flag
+ * @return this GitLabAPiForm instance
+ * @throws IllegalArgumentException if a required parameter is null or empty
+ */
+ public GitLabForm withParam(String name, Date date, boolean required) throws IllegalArgumentException {
+ return (withParam(name, (date == null ? null : ISO8601.toString(date)), required));
+ }
+
+ /**
+ * Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param level the value of the field/attribute to add
+ * @return this GitLabAPiForm instance
+ */
+ public GitLabForm withParam(String name, AccessLevel level) throws IllegalArgumentException {
+ return (withParam(name, level, false));
+ }
+
+ /**
+ * Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param level the value of the field/attribute to add
+ * @param required the field is required flag
+ * @return this GitLabAPiForm instance
+ * @throws IllegalArgumentException if a required parameter is null or empty
+ */
+ public GitLabForm withParam(String name, AccessLevel level, boolean required) throws IllegalArgumentException {
+ return (withParam(name, (level == null ? null : level.toValue()), required));
+ }
+
+ /**
+ * Fluent method for adding a List type query and form parameters to a get() or post() call.
+ *
+ * @param the type contained by the List
+ * @param name the name of the field/attribute to add
+ * @param values a List containing the values of the field/attribute to add
+ * @return this GitLabAPiForm instance
+ */
+ public GitLabForm withParam(String name, List values) {
+ return (withParam(name, values, false));
+ }
+
+ /**
+ * Fluent method for adding a List type query and form parameters to a get() or post() call.
+ *
+ * @param the type contained by the List
+ * @param name the name of the field/attribute to add
+ * @param values a List containing the values of the field/attribute to add
+ * @param required the field is required flag
+ * @return this GitLabAPiForm instance
+ * @throws IllegalArgumentException if a required parameter is null or empty
+ */
+ public GitLabForm withParam(String name, List values, boolean required) throws IllegalArgumentException {
+
+ if (values == null || values.isEmpty()) {
+ if (required) {
+ throw new IllegalArgumentException(name + " cannot be empty or null");
+ }
+
+ return (this);
+ }
+
+ for (T value : values) {
+ if (value != null) {
+ formValues.put(name + "[]", value.toString());
+ }
+ }
+
+ return (this);
+ }
+
+ /**
+ * Fluent method for adding an array of hash type query and form parameters to a get() or post() call.
+ *
+ * @param name the name of the field/attribute to add
+ * @param variables a Map containing array of hashes
+ * @param required the field is required flag
+ * @return this GitLabAPiForm instance
+ * @throws IllegalArgumentException if a required parameter is null or empty
+ */
+ public GitLabForm withParam(String name, Map variables, boolean required)
+ throws IllegalArgumentException {
+
+ if (variables == null || variables.isEmpty()) {
+ if (required) {
+ throw new IllegalArgumentException(name + " cannot be empty or null");
+ }
+
+ return (this);
+ }
+
+ for (Entry variable : variables.entrySet()) {
+ Object value = variable.getValue();
+ if (value != null) {
+ formValues.put(name + "[" + variable.getKey() + "]", value.toString());
+ }
+ }
+
+ return (this);
+ }
+
+ /**
+ * Fluent method for adding query and form parameters to a get() or post() call.
+ * If required is true and value is null, will throw an IllegalArgumentException.
+ *
+ * @param name the name of the field/attribute to add
+ * @param value the value of the field/attribute to add
+ * @param required the field is required flag
+ * @return this GitLabAPiForm instance
+ * @throws IllegalArgumentException if a required parameter is null or empty
+ */
+ public GitLabForm withParam(String name, Object value, boolean required) throws IllegalArgumentException {
+
+ if (value == null) {
+ if (required) {
+ throw new IllegalArgumentException(name + " cannot be empty or null");
+ }
+
+ return (this);
+ }
+
+ String stringValue = value.toString();
+ if (required && stringValue.trim().length() == 0) {
+ throw new IllegalArgumentException(name + " cannot be empty or null");
+ }
+
+ formValues.put(name.trim(), stringValue);
+ return (this);
+ }
+
+ /**
+ * Fluent method for adding a List<Variable> type query and form parameters to a get(), post(), or put() call.
+ *
+ * @param variables the List of Variable to add
+ * @return this GitLabAPiForm instance
+ */
+ public GitLabForm withParam(List variables) {
+
+ if (variables == null || variables.isEmpty()) {
+ return (this);
+ }
+
+ variables.forEach(v -> {
+ String value = v.getValue();
+ if (value != null) {
+ formValues.put("variables[" + v.getKey() + "]", value);
+ }
+ });
+
+ return (this);
+ }
+
+ public Map getFormValues() {
+ return formValues;
+ }
+}
diff --git a/src/main/java/org/gitlab4j/api/utils/DurationUtils.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/DurationUtils.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/utils/DurationUtils.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/models/utils/DurationUtils.java
index b0bd662ec..1d09cfc92 100644
--- a/src/main/java/org/gitlab4j/api/utils/DurationUtils.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/DurationUtils.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api.utils;
+package org.gitlab4j.models.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/src/main/java/org/gitlab4j/api/utils/FileUtils.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/FileUtils.java
similarity index 80%
rename from src/main/java/org/gitlab4j/api/utils/FileUtils.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/models/utils/FileUtils.java
index 8c42c67cf..42a268b8a 100644
--- a/src/main/java/org/gitlab4j/api/utils/FileUtils.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/FileUtils.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api.utils;
+package org.gitlab4j.models.utils;
import java.io.File;
import java.io.FileInputStream;
@@ -8,9 +8,7 @@
import java.util.Base64;
import java.util.Scanner;
-import jakarta.ws.rs.core.Response;
-
-import org.gitlab4j.api.Constants.Encoding;
+import org.gitlab4j.models.Constants.Encoding;
/**
* This class provides static utility methods used throughout GitLab4J.
@@ -51,21 +49,6 @@ public static File createUniqueFile(File directory, String filename) throws IOEx
return (uniqueFile);
}
- /**
- * Get the filename from the "Content-Disposition" header of a JAX-RS response.
- *
- * @param response the JAX-RS Response instance to get the "Content-Disposition" header filename from
- * @return the filename from the "Content-Disposition" header of a JAX-RS response, or null
- * if the "Content-Disposition" header is not present in the response
- */
- public static String getFilenameFromContentDisposition(Response response) {
-
- String disposition = response.getHeaderString("Content-Disposition");
- if (disposition == null || disposition.trim().length() == 0) return (null);
-
- return (disposition.replaceFirst("(?i)^.*filename=\"([^\"]+)\".*$", "$1"));
- }
-
/**
* Reads the contents of a File to a String.
*
diff --git a/src/main/java/org/gitlab4j/api/utils/ISO8601.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/ISO8601.java
similarity index 99%
rename from src/main/java/org/gitlab4j/api/utils/ISO8601.java
rename to gitlab4j-models/src/main/java/org/gitlab4j/models/utils/ISO8601.java
index 7f05dab46..e4c5d3e3a 100644
--- a/src/main/java/org/gitlab4j/api/utils/ISO8601.java
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/ISO8601.java
@@ -1,4 +1,4 @@
-package org.gitlab4j.api.utils;
+package org.gitlab4j.models.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/JacksonJson.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/JacksonJson.java
new file mode 100644
index 000000000..9ee768b5b
--- /dev/null
+++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/utils/JacksonJson.java
@@ -0,0 +1,370 @@
+package org.gitlab4j.models.utils;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+import org.gitlab4j.api.models.User;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectWriter;
+import com.fasterxml.jackson.databind.PropertyNamingStrategy;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.type.CollectionType;
+
+/**
+ * Jackson JSON Configuration and utility class.
+ */
+public class JacksonJson {
+
+ private static final SimpleDateFormat iso8601UtcFormat;
+
+ static {
+ iso8601UtcFormat = new SimpleDateFormat(ISO8601.UTC_PATTERN);
+ iso8601UtcFormat.setLenient(true);
+ iso8601UtcFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ }
+
+ private final ObjectMapper objectMapper;
+
+ public JacksonJson() {
+
+ objectMapper = new ObjectMapper();
+
+ objectMapper.setSerializationInclusion(Include.NON_NULL);
+ objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
+
+ objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+ objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
+ objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ objectMapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
+
+ SimpleModule module = new SimpleModule("GitLabApiJsonModule");
+ module.addSerializer(Date.class, new JsonDateSerializer());
+ module.addDeserializer(Date.class, new JsonDateDeserializer());
+ objectMapper.registerModule(module);
+ }
+
+ /**
+ * Gets the ObjectMapper contained by this instance.
+ *
+ * @return the ObjectMapper contained by this instance
+ */
+ public ObjectMapper getObjectMapper() {
+ return (objectMapper);
+ }
+
+ /**
+ * Reads and parses the String containing JSON data and returns a JsonNode tree representation.
+ *
+ * @param postData a String holding the POST data
+ * @return a JsonNode instance containing the parsed JSON
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public JsonNode readTree(String postData) throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.readTree(postData));
+ }
+
+ /**
+ * Reads and parses the JSON data on the specified Reader instance to a JsonNode tree representation.
+ *
+ * @param reader the Reader instance that contains the JSON data
+ * @return a JsonNode instance containing the parsed JSON
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public JsonNode readTree(Reader reader) throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.readTree(reader));
+ }
+
+ /**
+ * Unmarshal the JsonNode (tree) to an instance of the provided class.
+ *
+ * @param the generics type for the return value
+ * @param returnType an instance of this type class will be returned
+ * @param tree the JsonNode instance that contains the JSON data
+ * @return an instance of the provided class containing the data from the tree
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public T unmarshal(Class returnType, JsonNode tree)
+ throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.treeToValue(tree, returnType));
+ }
+
+ /**
+ * Unmarshal the JSON data on the specified Reader instance to an instance of the provided class.
+ *
+ * @param the generics type for the return value
+ * @param returnType an instance of this type class will be returned
+ * @param reader the Reader instance that contains the JSON data
+ * @return an instance of the provided class containing the parsed data from the Reader
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public T unmarshal(Class returnType, Reader reader)
+ throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.readValue(reader, returnType));
+ }
+
+ /**
+ * Unmarshal the JSON data contained by the string and populate an instance of the provided returnType class.
+ *
+ * @param the generics type for the return value
+ * @param returnType an instance of this type class will be returned
+ * @param postData a String holding the POST data
+ * @return an instance of the provided class containing the parsed data from the string
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public T unmarshal(Class returnType, String postData)
+ throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.readValue(postData, returnType));
+ }
+
+ /**
+ * Unmarshal the JSON data on the specified Reader instance and populate a List of instances of the provided returnType class.
+ *
+ * @param the generics type for the List
+ * @param returnType an instance of this type class will be contained in the returned List
+ * @param reader the Reader instance that contains the JSON data
+ * @return a List of the provided class containing the parsed data from the Reader
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public List unmarshalList(Class returnType, Reader reader)
+ throws JsonParseException, JsonMappingException, IOException {
+ CollectionType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, returnType);
+ return (objectMapper.readValue(reader, javaType));
+ }
+
+ /**
+ * Unmarshal the JSON data contained by the string and populate a List of instances of the provided returnType class.
+ *
+ * @param the generics type for the List
+ * @param returnType an instance of this type class will be contained in the returned List
+ * @param postData a String holding the POST data
+ * @return a List of the provided class containing the parsed data from the string
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public List unmarshalList(Class returnType, String postData)
+ throws JsonParseException, JsonMappingException, IOException {
+ CollectionType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, returnType);
+ return (objectMapper.readValue(postData, javaType));
+ }
+
+ /**
+ * Unmarshal the JSON data on the specified Reader instance and populate a Map of String keys and values of the provided returnType class.
+ *
+ * @param the generics type for the Map value
+ * @param returnType an instance of this type class will be contained the values of the Map
+ * @param reader the Reader instance that contains the JSON data
+ * @return a Map containing the parsed data from the Reader
+ * @throws JsonParseException when an error occurs parsing the provided JSON
+ * @throws JsonMappingException if a JSON error occurs
+ * @throws IOException if an error occurs reading the JSON data
+ */
+ public Map unmarshalMap(Class returnType, Reader reader)
+ throws JsonParseException, JsonMappingException, IOException {
+ return (objectMapper.readValue(reader, new TypeReference