From f237167c5b40156ea8534b542b44fff72808ec6c Mon Sep 17 00:00:00 2001 From: Gautier de Saint Martin Lacaze Date: Mon, 7 Mar 2022 15:51:04 +0100 Subject: [PATCH] Fix #810 : Change all model Ids to Long --- .../java/org/gitlab4j/api/AbstractApi.java | 16 +- .../gitlab4j/api/ApplicationSettingsApi.java | 4 +- .../org/gitlab4j/api/ApplicationsApi.java | 2 +- .../java/org/gitlab4j/api/AuditEventApi.java | 8 +- .../java/org/gitlab4j/api/AwardEmojiApi.java | 52 +-- src/main/java/org/gitlab4j/api/BoardsApi.java | 84 ++-- .../java/org/gitlab4j/api/CommitsApi.java | 98 ++--- .../gitlab4j/api/ContainerRegistryApi.java | 40 +- .../java/org/gitlab4j/api/DeployKeysApi.java | 30 +- .../org/gitlab4j/api/DeployTokensApi.java | 28 +- .../java/org/gitlab4j/api/DeploymentsApi.java | 38 +- .../java/org/gitlab4j/api/DiscussionsApi.java | 142 +++---- .../org/gitlab4j/api/EnvironmentsApi.java | 12 +- src/main/java/org/gitlab4j/api/EpicsApi.java | 46 +-- src/main/java/org/gitlab4j/api/EventsApi.java | 12 +- src/main/java/org/gitlab4j/api/GitLabApi.java | 8 +- .../org/gitlab4j/api/GitLabApiClient.java | 9 +- src/main/java/org/gitlab4j/api/GroupApi.java | 82 ++-- .../org/gitlab4j/api/ImportExportApi.java | 14 +- src/main/java/org/gitlab4j/api/IssuesApi.java | 156 ++++---- src/main/java/org/gitlab4j/api/JobApi.java | 32 +- src/main/java/org/gitlab4j/api/LabelsApi.java | 96 ++--- .../java/org/gitlab4j/api/LicenseApi.java | 4 +- .../org/gitlab4j/api/MergeRequestApi.java | 218 +++++----- .../java/org/gitlab4j/api/MilestonesApi.java | 104 ++--- src/main/java/org/gitlab4j/api/NotesApi.java | 96 ++--- .../gitlab4j/api/NotificationSettingsApi.java | 24 +- .../java/org/gitlab4j/api/PackagesApi.java | 36 +- .../java/org/gitlab4j/api/PipelineApi.java | 132 +++---- .../java/org/gitlab4j/api/ProjectApi.java | 374 +++++++++--------- .../gitlab4j/api/ProtectedBranchesApi.java | 22 +- .../java/org/gitlab4j/api/ReleasesApi.java | 2 +- .../java/org/gitlab4j/api/RepositoryApi.java | 80 ++-- .../org/gitlab4j/api/RepositoryFileApi.java | 20 +- .../gitlab4j/api/ResourceLabelEventsApi.java | 30 +- .../gitlab4j/api/ResourceStateEventsApi.java | 13 +- .../java/org/gitlab4j/api/RunnersApi.java | 32 +- src/main/java/org/gitlab4j/api/SearchApi.java | 12 +- .../java/org/gitlab4j/api/SnippetsApi.java | 12 +- .../java/org/gitlab4j/api/SystemHooksApi.java | 6 +- src/main/java/org/gitlab4j/api/TodosApi.java | 8 +- src/main/java/org/gitlab4j/api/UserApi.java | 86 ++-- src/main/java/org/gitlab4j/api/WikisApi.java | 28 +- .../org/gitlab4j/api/models/AbstractUser.java | 10 +- .../org/gitlab4j/api/models/AllowedTo.java | 10 +- .../org/gitlab4j/api/models/Application.java | 6 +- .../api/models/ApplicationSettings.java | 6 +- .../org/gitlab4j/api/models/ApprovalRule.java | 6 +- .../api/models/ApprovalRuleParams.java | 8 +- .../java/org/gitlab4j/api/models/Assets.java | 6 +- .../org/gitlab4j/api/models/AuditEvent.java | 18 +- .../org/gitlab4j/api/models/AwardEmoji.java | 12 +- .../java/org/gitlab4j/api/models/Badge.java | 6 +- .../java/org/gitlab4j/api/models/Board.java | 6 +- .../org/gitlab4j/api/models/BoardList.java | 6 +- .../api/models/BranchAccessLevel.java | 12 +- .../org/gitlab4j/api/models/DeployKey.java | 6 +- .../org/gitlab4j/api/models/DeployToken.java | 6 +- .../org/gitlab4j/api/models/Deployable.java | 6 +- .../org/gitlab4j/api/models/Deployment.java | 12 +- .../org/gitlab4j/api/models/Environment.java | 6 +- .../java/org/gitlab4j/api/models/Epic.java | 22 +- .../org/gitlab4j/api/models/EpicIssue.java | 24 +- .../java/org/gitlab4j/api/models/Event.java | 32 +- .../org/gitlab4j/api/models/EventData.java | 8 +- .../org/gitlab4j/api/models/ExportStatus.java | 6 +- .../java/org/gitlab4j/api/models/GpgKey.java | 6 +- .../org/gitlab4j/api/models/GpgSignature.java | 6 +- .../java/org/gitlab4j/api/models/Group.java | 16 +- .../org/gitlab4j/api/models/GroupParams.java | 8 +- .../api/models/ImpersonationToken.java | 6 +- .../org/gitlab4j/api/models/ImportStatus.java | 6 +- .../java/org/gitlab4j/api/models/Issue.java | 32 +- .../org/gitlab4j/api/models/IssueEvent.java | 12 +- .../org/gitlab4j/api/models/IssueFilter.java | 16 +- .../api/models/IssuesStatisticsFilter.java | 16 +- .../java/org/gitlab4j/api/models/Job.java | 8 +- .../java/org/gitlab4j/api/models/Key.java | 6 +- .../java/org/gitlab4j/api/models/Label.java | 6 +- .../org/gitlab4j/api/models/LabelEvent.java | 12 +- .../java/org/gitlab4j/api/models/License.java | 6 +- .../org/gitlab4j/api/models/Membership.java | 6 +- .../org/gitlab4j/api/models/MergeRequest.java | 30 +- .../gitlab4j/api/models/MergeRequestDiff.java | 12 +- .../api/models/MergeRequestFilter.java | 34 +- .../api/models/MergeRequestParams.java | 20 +- .../org/gitlab4j/api/models/Milestone.java | 24 +- .../org/gitlab4j/api/models/Namespace.java | 8 +- .../java/org/gitlab4j/api/models/Note.java | 22 +- .../java/org/gitlab4j/api/models/Package.java | 6 +- .../org/gitlab4j/api/models/PackageFile.java | 12 +- .../org/gitlab4j/api/models/Pipeline.java | 6 +- .../gitlab4j/api/models/PipelineSchedule.java | 6 +- .../java/org/gitlab4j/api/models/Project.java | 16 +- .../gitlab4j/api/models/ProjectFilter.java | 19 +- .../org/gitlab4j/api/models/ProjectHook.java | 12 +- .../api/models/ProjectSharedGroup.java | 6 +- .../org/gitlab4j/api/models/PushRules.java | 46 +-- .../api/models/RegistryRepository.java | 6 +- .../org/gitlab4j/api/models/RemoteMirror.java | 6 +- .../java/org/gitlab4j/api/models/Runner.java | 8 +- .../org/gitlab4j/api/models/SearchBlob.java | 12 +- .../java/org/gitlab4j/api/models/Snippet.java | 6 +- .../java/org/gitlab4j/api/models/SshKey.java | 14 +- .../org/gitlab4j/api/models/SystemHook.java | 8 +- .../java/org/gitlab4j/api/models/Todo.java | 6 +- .../java/org/gitlab4j/api/models/Trigger.java | 6 +- .../api/services/NotificationService.java | 6 +- .../GroupMemberSystemHookEvent.java | 15 +- .../api/systemhooks/GroupSystemHookEvent.java | 13 +- .../api/systemhooks/KeySystemHookEvent.java | 6 +- .../systemhooks/ProjectSystemHookEvent.java | 15 +- .../RepositorySystemHookEvent.java | 15 +- .../TeamMemberSystemHookEvent.java | 19 +- .../api/systemhooks/UserSystemHookEvent.java | 11 +- .../api/webhook/AbstractPushEvent.java | 14 +- .../org/gitlab4j/api/webhook/BuildCommit.java | 6 +- .../org/gitlab4j/api/webhook/BuildEvent.java | 15 +- .../gitlab4j/api/webhook/DeploymentEvent.java | 9 +- .../gitlab4j/api/webhook/EventChanges.java | 18 +- .../org/gitlab4j/api/webhook/EventIssue.java | 30 +- .../org/gitlab4j/api/webhook/EventLabel.java | 28 +- .../api/webhook/EventMergeRequest.java | 86 ++-- .../gitlab4j/api/webhook/EventProject.java | 6 +- .../api/webhook/EventReleaseLink.java | 6 +- .../gitlab4j/api/webhook/EventSnippet.java | 18 +- .../org/gitlab4j/api/webhook/JobEvent.java | 15 +- .../org/gitlab4j/api/webhook/NoteEvent.java | 33 +- .../gitlab4j/api/webhook/PipelineEvent.java | 6 +- .../gitlab4j/api/webhook/ReleaseEvent.java | 9 +- .../org/gitlab4j/api/TestDeploymentsApi.java | 1 - .../gitlab4j/api/TestEpicDiscussionsApi.java | 8 +- .../java/org/gitlab4j/api/TestGroupApi.java | 10 +- .../org/gitlab4j/api/TestImportExportApi.java | 2 +- .../gitlab4j/api/TestIssueDiscussionsApi.java | 8 +- .../java/org/gitlab4j/api/TestIssuesApi.java | 40 +- .../api/TestMergeRequestDiscussionsApi.java | 8 +- .../java/org/gitlab4j/api/TestProjectApi.java | 12 +- .../gitlab4j/api/TestProjectApiSnippets.java | 12 +- .../api/TestResourceStateEventsApi.java | 2 +- .../org/gitlab4j/api/TestServicesApi.java | 2 +- .../api/TestSnippetDiscussionsApi.java | 8 +- .../java/org/gitlab4j/api/TestTodosApi.java | 2 +- .../gitlab4j/api/TestUnitMergeRequestApi.java | 6 +- .../java/org/gitlab4j/api/TestUserApi.java | 6 +- 145 files changed, 1825 insertions(+), 1808 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/AbstractApi.java b/src/main/java/org/gitlab4j/api/AbstractApi.java index b337f50d..868199c0 100644 --- a/src/main/java/org/gitlab4j/api/AbstractApi.java +++ b/src/main/java/org/gitlab4j/api/AbstractApi.java @@ -46,8 +46,8 @@ public abstract class AbstractApi implements Constants { return (urlEncode(((String) obj).trim())); } else if (obj instanceof Project) { - Integer id = ((Project) obj).getId(); - if (id != null && id.intValue() > 0) { + Long id = ((Project) obj).getId(); + if (id != null && id.longValue() > 0) { return (id); } @@ -81,8 +81,8 @@ public abstract class AbstractApi implements Constants { return (urlEncode(((String) obj).trim())); } else if (obj instanceof Group) { - Integer id = ((Group) obj).getId(); - if (id != null && id.intValue() > 0) { + Long id = ((Group) obj).getId(); + if (id != null && id.longValue() > 0) { return (id); } @@ -116,8 +116,8 @@ public abstract class AbstractApi implements Constants { return (urlEncode(((String) obj).trim())); } else if (obj instanceof User) { - Integer id = ((User) obj).getId(); - if (id != null && id.intValue() > 0) { + Long id = ((User) obj).getId(); + if (id != null && id.longValue() > 0) { return (id); } @@ -151,8 +151,8 @@ public abstract class AbstractApi implements Constants { return (urlEncode(((String) obj).trim())); } else if (obj instanceof Label) { - Integer id = ((Label) obj).getId(); - if (id != null && id.intValue() > 0) { + Long id = ((Label) obj).getId(); + if (id != null && id.longValue() > 0) { return (id); } diff --git a/src/main/java/org/gitlab4j/api/ApplicationSettingsApi.java b/src/main/java/org/gitlab4j/api/ApplicationSettingsApi.java index 131ee3d0..28ff1d71 100644 --- a/src/main/java/org/gitlab4j/api/ApplicationSettingsApi.java +++ b/src/main/java/org/gitlab4j/api/ApplicationSettingsApi.java @@ -37,7 +37,7 @@ public class ApplicationSettingsApi extends AbstractApi { } /** - * Update the application settings of the GitLab instance with the settings in the + * Update the application settings of the GitLab instance with the settings in the * provided ApplicationSettings instance. * *
GitLab Endpoint: PUT /api/v4/application/settings
@@ -117,7 +117,7 @@ public class ApplicationSettingsApi extends AbstractApi { String fieldName = fieldNames.next(); switch (fieldName) { case "id": - appSettings.setId(root.path(fieldName).asInt()); + appSettings.setId(root.path(fieldName).asLong()); break; case "created_at": diff --git a/src/main/java/org/gitlab4j/api/ApplicationsApi.java b/src/main/java/org/gitlab4j/api/ApplicationsApi.java index b8053cad..b5c79370 100644 --- a/src/main/java/org/gitlab4j/api/ApplicationsApi.java +++ b/src/main/java/org/gitlab4j/api/ApplicationsApi.java @@ -126,7 +126,7 @@ public class ApplicationsApi extends AbstractApi { * @param applicationId the ID of the OUAUTH Application to delete * @throws GitLabApiException if any exception occurs */ - public void deleteApplication(Integer applicationId) throws GitLabApiException { + public void deleteApplication(Long applicationId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "applications", applicationId); } } diff --git a/src/main/java/org/gitlab4j/api/AuditEventApi.java b/src/main/java/org/gitlab4j/api/AuditEventApi.java index ec797605..eebfb617 100644 --- a/src/main/java/org/gitlab4j/api/AuditEventApi.java +++ b/src/main/java/org/gitlab4j/api/AuditEventApi.java @@ -32,7 +32,7 @@ public class AuditEventApi extends AbstractApi { * @return a List of group Audit events * @throws GitLabApiException if any exception occurs */ - public List getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { + public List getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException { return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all()); } @@ -49,7 +49,7 @@ public class AuditEventApi extends AbstractApi { * @return a Pager of group Audit events * @throws GitLabApiException if any exception occurs */ - public Pager getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId, int itemsPerPage) throws GitLabApiException { + public Pager getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId, int itemsPerPage) throws GitLabApiException { Form form = new GitLabApiForm() .withParam("created_before", ISO8601.toString(created_before, false)) .withParam("created_after", ISO8601.toString(created_after, false)) @@ -70,7 +70,7 @@ public class AuditEventApi extends AbstractApi { * @return a Stream of group Audit events * @throws GitLabApiException if any exception occurs */ - public Stream getAuditEventsStream(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { + public Stream getAuditEventsStream(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException { return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream()); } @@ -83,7 +83,7 @@ public class AuditEventApi extends AbstractApi { * @return the group Audit event * @throws GitLabApiException if any exception occurs */ - public AuditEvent getAuditEvent(Integer auditEventId) throws GitLabApiException { + public AuditEvent getAuditEvent(Long auditEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "audit_events", auditEventId); return (response.readEntity(AuditEvent.class)); } diff --git a/src/main/java/org/gitlab4j/api/AwardEmojiApi.java b/src/main/java/org/gitlab4j/api/AwardEmojiApi.java index 5e1ce181..dce6a130 100644 --- a/src/main/java/org/gitlab4j/api/AwardEmojiApi.java +++ b/src/main/java/org/gitlab4j/api/AwardEmojiApi.java @@ -29,7 +29,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified issue * @throws GitLabApiException if any exception occurs */ - public List getIssueAwardEmojis(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueAwardEmojis(Object projectIdOrPath, Long issueIid) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); return response.readEntity(new GenericType>() {}); @@ -45,7 +45,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified merge request * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestAwardEmojis(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); return response.readEntity(new GenericType>() {}); @@ -61,7 +61,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified snippet * @throws GitLabApiException if any exception occurs */ - public List getSnippetAwardEmojis(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public List getSnippetAwardEmojis(Object projectIdOrPath, Long snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); return response.readEntity(new GenericType>() {}); @@ -78,7 +78,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified note * @throws GitLabApiException if any exception occurs */ - public List getIssueNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { + public List getIssueNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); return response.readEntity(new GenericType>() {}); @@ -95,7 +95,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified note * @throws GitLabApiException if any exception occurs */ - public List getNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { + public List getNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException { return getIssueNoteAwardEmojis(projectIdOrPath, issueIid, noteId); } @@ -110,7 +110,7 @@ public class AwardEmojiApi extends AbstractApi { * @return a list of AwardEmoji for the specified note * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException { + public List getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji"); return response.readEntity(new GenericType>() {}); @@ -127,7 +127,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException { + public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Long issueIid, Long awardId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); return (response.readEntity(AwardEmoji.class)); @@ -144,7 +144,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException { + public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long awardId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); return (response.readEntity(AwardEmoji.class)); @@ -161,7 +161,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException { + public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, Long awardId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); return (response.readEntity(AwardEmoji.class)); @@ -179,7 +179,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji getIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { + public AwardEmoji getIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); return (response.readEntity(AwardEmoji.class)); @@ -196,10 +196,10 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to get * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs - * @deprecated use {@link #getIssueNoteAwardEmoji(Object, Integer, Integer, Integer)} instead + * @deprecated use {@link #getIssueNoteAwardEmoji(Object, Long, Long, Long)} instead */ @Deprecated - public AwardEmoji getNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { + public AwardEmoji getNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException { return getIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId); } @@ -215,7 +215,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the specified award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji getMergeRequestNoteAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, Integer awardId) throws GitLabApiException { + public AwardEmoji getMergeRequestNoteAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long noteId, Long awardId) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); return (response.readEntity(AwardEmoji.class)); @@ -232,7 +232,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the added award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji addIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, String name) throws GitLabApiException { + public AwardEmoji addIssueAwardEmoji(Object projectIdOrPath, Long issueIid, String name) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); Response response = post(Response.Status.CREATED, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); @@ -250,7 +250,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the added award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, String name) throws GitLabApiException { + public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, String name) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); Response response = post(Response.Status.CREATED, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); @@ -268,7 +268,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the added award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji addSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, String name) throws GitLabApiException { + public AwardEmoji addSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, String name) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); Response response = post(Response.Status.CREATED, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); @@ -287,7 +287,7 @@ public class AwardEmojiApi extends AbstractApi { * @return an AwardEmoji instance for the added award emoji * @throws GitLabApiException if any exception occurs */ - public AwardEmoji addIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException { + public AwardEmoji addIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, String name) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); Response response = post(Response.Status.CREATED, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); @@ -305,10 +305,10 @@ public class AwardEmojiApi extends AbstractApi { * @param name the name of the award emoji to add * @return an AwardEmoji instance for the added award emoji * @throws GitLabApiException if any exception occurs - * @deprecated use {@link #addIssueNoteAwardEmoji(Object, Integer, Integer, String)} + * @deprecated use {@link #addIssueNoteAwardEmoji(Object, Long, Long, String)} */ @Deprecated - public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException { + public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, String name) throws GitLabApiException { return addIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, name); } @@ -341,7 +341,7 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs */ - public void deleteIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException { + public void deleteIssueAwardEmoji(Object projectIdOrPath, Long issueIid, Long awardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); } @@ -356,7 +356,7 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs */ - public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException { + public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long awardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); } @@ -371,7 +371,7 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs */ - public void deleteSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException { + public void deleteSnippetAwardEmoji(Object projectIdOrPath, Long snippetId, Long awardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); } @@ -387,7 +387,7 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs */ - public void deleteIssueNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { + public void deleteIssueNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); } @@ -402,10 +402,10 @@ public class AwardEmojiApi extends AbstractApi { * @param noteId the note ID of the note to delete the award emoji from * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs - * @deprecated use {@link #deleteIssueNoteAwardEmoji(Object, Integer, Integer, Integer)} instead + * @deprecated use {@link #deleteIssueNoteAwardEmoji(Object, Long, Long, Long)} instead */ @Deprecated - public void deleteNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, Integer awardId) throws GitLabApiException { + public void deleteNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long noteId, Long awardId) throws GitLabApiException { deleteIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId); } @@ -420,7 +420,7 @@ public class AwardEmojiApi extends AbstractApi { * @param awardId the ID of the award emoji to delete * @throws GitLabApiException if any exception occurs */ - public void deleteMergeRequestNoteAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, Integer awardId) throws GitLabApiException { + public void deleteMergeRequestNoteAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long noteId, Long awardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); } diff --git a/src/main/java/org/gitlab4j/api/BoardsApi.java b/src/main/java/org/gitlab4j/api/BoardsApi.java index 3de2c58d..975cba5e 100644 --- a/src/main/java/org/gitlab4j/api/BoardsApi.java +++ b/src/main/java/org/gitlab4j/api/BoardsApi.java @@ -12,10 +12,10 @@ import org.gitlab4j.api.models.BoardList; /** * This class implements the client side API for the GitLab Issue Boards API calls. - * - * NOTE: If a user is not a member of a group and the group is private, + * + * NOTE: If a user is not a member of a group and the group is private, * a GET request on that group will result to a 404 status code. - * + * * @see GitLab Issue Boards API Documentaion */ public class BoardsApi extends AbstractApi { @@ -29,7 +29,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's issue boards * @throws GitLabApiException if any exception occurs */ @@ -42,7 +42,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of items per page * @return a list of project's Boards in the specified range @@ -59,7 +59,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of items per page * @return a Pager of project's issue boards * @throws GitLabApiException if any exception occurs @@ -74,7 +74,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's issue boards * @throws GitLabApiException if any exception occurs */ @@ -87,13 +87,13 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @return a Board instance for the specified board ID * @throws GitLabApiException if any exception occurs */ - public Board getBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException { - Response response = get(Response.Status.OK, null, + public Board getBoard(Object projectIdOrPath, Long boardId) throws GitLabApiException { + Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId); return (response.readEntity(Board.class)); } @@ -101,13 +101,13 @@ public class BoardsApi extends AbstractApi { /** * Get an issue board as an Optional instance. * - *
GitLab Endpoint: GET /projects/:id/boards/:board_id
+ *
GitLab Endpoint: GET /projects/:id/boards/:board_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @return the Board instance for the specified board ID as an Optional instance */ - public Optional getOptionalBoard(Object projectIdOrPath, Integer boardId) { + public Optional getOptionalBoard(Object projectIdOrPath, Long boardId) { try { return (Optional.ofNullable(getBoard(projectIdOrPath, boardId))); } catch (GitLabApiException glae) { @@ -122,7 +122,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/boards
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the new board * @return the created Board instance * @throws GitLabApiException if any exception occurs @@ -140,7 +140,7 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/boards/:board_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param boardId the ID of the board, required * @param name the new name of the board, optional (can be null) * @param assigneeId the assignee the board should be scoped to, optional (can be null) @@ -150,8 +150,8 @@ public class BoardsApi extends AbstractApi { * @return the updated Board instance * @throws GitLabApiException if any exception occurs */ - public BoardList updateBoard(Object projectIdOrPath, Integer boardId, String name, - Integer assigneeId, Integer milestoneId, String labels, Integer weight) throws GitLabApiException { + public BoardList updateBoard(Object projectIdOrPath, Long boardId, String name, + Long assigneeId, Long milestoneId, String labels, Integer weight) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("name", name) .withParam("assignee_id", assigneeId) @@ -170,11 +170,11 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/boards/:board_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @throws GitLabApiException if any exception occurs */ - public void deleteBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException { + public void deleteBoard(Object projectIdOrPath, Long boardId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId); } @@ -183,12 +183,12 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @return a list of the issue board's lists * @throws GitLabApiException if any exception occurs */ - public List getBoardLists(Object projectIdOrPath, Integer boardId) throws GitLabApiException { + public List getBoardLists(Object projectIdOrPath, Long boardId) throws GitLabApiException { return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).all()); } @@ -198,14 +198,14 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param page the page to get * @param perPage the number of Boards per page * @return a list of the issue board's lists in the specified range * @throws GitLabApiException if any exception occurs */ - public List getBoardLists(Object projectIdOrPath, Integer boardId, int page, int perPage) throws GitLabApiException { + public List getBoardLists(Object projectIdOrPath, Long boardId, int page, int perPage) throws GitLabApiException { Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); return (response.readEntity(new GenericType>() {})); @@ -216,13 +216,13 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param itemsPerPage the number of Board instances that will be fetched per page * @return a Pager of the issue board's lists * @throws GitLabApiException if any exception occurs */ - public Pager getBoardLists(Object projectIdOrPath, Integer boardId, int itemsPerPage) throws GitLabApiException { + public Pager getBoardLists(Object projectIdOrPath, Long boardId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, BoardList.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists")); } @@ -232,12 +232,12 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @return a Stream of the issue board's lists * @throws GitLabApiException if any exception occurs */ - public Stream getBoardsListsStream(Object projectIdOrPath, Integer boardId) throws GitLabApiException { + public Stream getBoardsListsStream(Object projectIdOrPath, Long boardId) throws GitLabApiException { return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).stream()); } @@ -246,14 +246,14 @@ public class BoardsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param listId the ID of the board lists to get * @return a BoardList instance for the specified board ID and list ID * @throws GitLabApiException if any exception occurs */ - public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { - Response response = get(Response.Status.OK, null, + public BoardList getBoardList(Object projectIdOrPath, Long boardId, Long listId) throws GitLabApiException { + Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); return (response.readEntity(BoardList.class)); } @@ -261,14 +261,14 @@ public class BoardsApi extends AbstractApi { /** * Get a single issue board list as an Optional instance. * - *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id
+ *
GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param listId the ID of the board lists to get * @return a BoardList instance for the specified board ID and list ID as an Optional instance */ - public Optional getOptionalBoardList(Object projectIdOrPath, Integer boardId, Integer listId) { + public Optional getOptionalBoardList(Object projectIdOrPath, Long boardId, Long listId) { try { return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId))); } catch (GitLabApiException glae) { @@ -279,15 +279,15 @@ public class BoardsApi extends AbstractApi { /** * Creates a new Issue Board list. * - *
GitLab Endpoint: POST /projects/:id/boards/:board_id/lists
+ *
GitLab Endpoint: POST /projects/:id/boards/:board_id/lists
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param labelId the ID of the label * @return the created BoardList instance * @throws GitLabApiException if any exception occurs */ - public BoardList createBoardList(Object projectIdOrPath, Integer boardId, Integer labelId) throws GitLabApiException { + public BoardList createBoardList(Object projectIdOrPath, Long boardId, Long labelId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("label_id", labelId, true); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); @@ -297,16 +297,16 @@ public class BoardsApi extends AbstractApi { /** * Updates an existing Issue Board list. This call is used to change list position. * - *
GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id
+ *
GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param listId the ID of the list * @param position the new position for the list * @return the updated BoardList instance * @throws GitLabApiException if any exception occurs */ - public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException { + public BoardList updateBoardList(Object projectIdOrPath, Long boardId, Long listId, Integer position) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true); Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); @@ -316,14 +316,14 @@ public class BoardsApi extends AbstractApi { /** * Soft deletes an existing Issue Board list. Only for admins and project owners. * - *
GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id
+ *
GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param boardId the ID of the board * @param listId the ID of the list * @throws GitLabApiException if any exception occurs */ - public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { + public void deleteBoardList(Object projectIdOrPath, Long boardId, Long listId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); } } diff --git a/src/main/java/org/gitlab4j/api/CommitsApi.java b/src/main/java/org/gitlab4j/api/CommitsApi.java index eaaaaa05..c6cffde7 100644 --- a/src/main/java/org/gitlab4j/api/CommitsApi.java +++ b/src/main/java/org/gitlab4j/api/CommitsApi.java @@ -40,7 +40,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list containing the commits for the specified project ID * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ @@ -53,7 +53,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of commits per page * @return a list containing the commits for the specified project ID @@ -70,7 +70,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Commit instances that will be fetched per page * @return a Pager containing the commits for the specified project ID * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -84,7 +84,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream containing the commits for the specified project ID * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ @@ -97,7 +97,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -114,7 +114,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits?path=:file_path
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param path the path to file of a project * @return a list containing the commits for the specified project ID and file @@ -129,7 +129,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -145,7 +145,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -165,7 +165,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -181,7 +181,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -198,7 +198,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -227,7 +227,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -244,7 +244,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -262,7 +262,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -283,7 +283,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -313,7 +313,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the name of a repository branch or tag or if not given the default branch * @param since only commits after or on this date will be returned * @param until only commits before or on this date will be returned @@ -334,7 +334,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return the Commit instance for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -349,7 +349,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return the Commit for the specified project ID/sha pair as an Optional instance */ @@ -366,7 +366,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a List of all references (from branches or tags) a commit is pushed to * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -381,7 +381,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param itemsPerPage the number of Commit instances that will be fetched per page * @return a Pager of references (from branches or tags) a commit is pushed to @@ -397,7 +397,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a Stream of all references (from branches or tags) a commit is pushed to * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -412,7 +412,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param refType the scope of commits. Possible values branch, tag, all. Default is all. * @return a List of all references (from branches or tags) a commit is pushed to @@ -428,7 +428,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param refType the scope of commits. Possible values branch, tag, all. Default is all. * @param itemsPerPage the number of Commit instances that will be fetched per page @@ -446,7 +446,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param refType the scope of commits. Possible values branch, tag, all. Default is all. * @return a Stream of all references (from branches or tags) a commit is pushed to @@ -462,7 +462,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA * @param filter the commit statuses file, contains ref, stage, name, all * @return a List containing the commit statuses for the specified project and sha that meet the provided filter @@ -477,7 +477,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA * @param filter the commit statuses file, contains ref, stage, name, all * @param page the page to get @@ -508,7 +508,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA * @param filter the commit statuses file, contains ref, stage, name, all * @param itemsPerPage the number of CommitStatus instances that will be fetched per page @@ -536,7 +536,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA * @param filter the commit statuses file, contains ref, stage, name, all * @return a Stream containing the commit statuses for the specified project and sha that meet the provided filter @@ -559,7 +559,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/statuses/:sha
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance (required) + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance (required) * @param sha a commit SHA (required) * @param state the state of the status. Can be one of the following: PENDING, RUNNING, SUCCESS, FAILED, CANCELED (required) * @param status the CommitSatus instance hoilding the optional parms: ref, name, target_url, description, and coverage @@ -583,7 +583,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/statuses/:sha
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance (required) + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance (required) * @param sha a commit SHA (required) * @param state the state of the status. Can be one of the following: PENDING, RUNNING, SUCCESS, FAILED, CANCELED (required) * @param pipelineId The ID of the pipeline to set status. Use in case of several pipeline on same SHA (optional) @@ -591,7 +591,7 @@ public class CommitsApi extends AbstractApi { * @return a CommitStatus instance with the updated info * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ - public CommitStatus addCommitStatus(Object projectIdOrPath, String sha, CommitBuildState state, Integer pipelineId, CommitStatus status) throws GitLabApiException { + public CommitStatus addCommitStatus(Object projectIdOrPath, String sha, CommitBuildState state, Long pipelineId, CommitStatus status) throws GitLabApiException { if (projectIdOrPath == null) { throw new RuntimeException("projectIdOrPath cannot be null"); @@ -623,7 +623,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a List of Diff instances for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -637,7 +637,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param itemsPerPage the number of Diff instances that will be fetched per page * @return a Pager of Diff instances for the specified project ID/sha pair @@ -662,7 +662,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a Stream of Diff instances for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -676,7 +676,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a List of Comment instances for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -690,7 +690,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param itemsPerPage the number of Comment instances that will be fetched per page * @return a List of Comment instances for the specified project ID/sha pair @@ -705,7 +705,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return a Stream of Comment instances for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -720,7 +720,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param note the text of the comment, required * @param path the file path relative to the repository, optional @@ -744,7 +744,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @param note the text of the comment, required * @return a Comment instance for the posted comment @@ -759,7 +759,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branch tame of the branch to commit into. To create a new branch, also provide startBranch * @param commitMessage the commit message * @param startBranch the name of the branch to start the new commit from @@ -786,7 +786,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branch tame of the branch to commit into. To create a new branch, also provide startBranch * @param commitMessage the commit message * @param startBranch the name of the branch to start the new commit from @@ -814,7 +814,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param payload a CommitPayload instance holding the parameters for the commit * @return the created Commit instance * @throws GitLabApiException if any exception occurs during execution @@ -854,7 +854,7 @@ public class CommitsApi extends AbstractApi { *
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/revert
* * @since GitLab 11.5 - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA to revert * @param branch the target branch to revert the commit on * @return a Commit instance holding the reverted commit @@ -873,7 +873,7 @@ public class CommitsApi extends AbstractApi { *
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/cherry_pick
* * @since GitLab 8.15 - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA to cherry pick * @param branch the target branch to cherry pick the commit on * @return a Commit instance holding the cherry picked commit @@ -891,7 +891,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA to get merge requests for * @return a list containing the MergeRequest instances for the specified project/SHA * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -905,7 +905,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA to get merge requests for * @param itemsPerPage the number of Commit instances that will be fetched per page * @return a Pager containing the MergeRequest instances for the specified project/SHA @@ -921,7 +921,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the commit SHA to get merge requests for * @return a Stream containing the MergeRequest instances for the specified project/SHA * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -935,7 +935,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return the GpgSignature instance for the specified project ID/sha pair * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -951,7 +951,7 @@ public class CommitsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha a commit hash or name of a branch or tag * @return the GpgSignature for the specified project ID/sha pair as an Optional instance */ diff --git a/src/main/java/org/gitlab4j/api/ContainerRegistryApi.java b/src/main/java/org/gitlab4j/api/ContainerRegistryApi.java index 91eb47af..87fc6289 100644 --- a/src/main/java/org/gitlab4j/api/ContainerRegistryApi.java +++ b/src/main/java/org/gitlab4j/api/ContainerRegistryApi.java @@ -49,7 +49,7 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of pages in the project's registry repositories * @throws GitLabApiException if any exception occurs */ @@ -62,7 +62,7 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Package instances per page * @return a list of registry repositories for the specified range @@ -80,7 +80,7 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of RegistryRepository instances per page * @return a Pager of registry repositories for the specified range * @throws GitLabApiException if any exception occurs @@ -95,7 +95,7 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of pages in the project's registry repositories * @throws GitLabApiException if any exception occurs */ @@ -110,11 +110,11 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @throws GitLabApiException if any exception occurs */ - public void deleteRepository(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { + public void deleteRepository(Object projectIdOrPath, Long repositoryId) throws GitLabApiException { if (repositoryId == null) { throw new RuntimeException("repositoryId cannot be null"); @@ -128,12 +128,12 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @return a list of Repository Tags for the specified repository ID * @throws GitLabApiException if any exception occurs */ - public List getRepositoryTags(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { + public List getRepositoryTags(Object projectIdOrPath, Long repositoryId) throws GitLabApiException { return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).all(); } @@ -142,13 +142,13 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @param itemsPerPage the number of RegistryRepositoryTag instances per page * @return a Pager of Repository Tags for the specified repository ID * @throws GitLabApiException if any exception occurs */ - public Pager getRepositoryTags(Object projectIdOrPath, Integer repositoryId, int itemsPerPage) throws GitLabApiException { + public Pager getRepositoryTags(Object projectIdOrPath, Long repositoryId, int itemsPerPage) throws GitLabApiException { return (new Pager<>(this, RegistryRepositoryTag.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags")); } @@ -158,12 +158,12 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @return a list of Repository Tags for the specified repository ID * @throws GitLabApiException if any exception occurs */ - public Stream getRepositoryTagsStream(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { + public Stream getRepositoryTagsStream(Object projectIdOrPath, Long repositoryId) throws GitLabApiException { return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).stream(); } @@ -172,13 +172,13 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @param tagName the name of tag * @return the Repository Tag for the specified repository ID * @throws GitLabApiException if any exception occurs */ - public RegistryRepositoryTag getRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) throws GitLabApiException { + public RegistryRepositoryTag getRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags", tagName); return response.readEntity(new GenericType() { @@ -190,12 +190,12 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @param tagName the name of tag * @return the Repository Tag for the specified repository ID as the value of the Optional */ - public Optional getOptionalRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) { + public Optional getOptionalRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) { try { return (Optional.ofNullable(getRepositoryTag(projectIdOrPath, repositoryId, tagName))); } catch (GitLabApiException glae) { @@ -208,12 +208,12 @@ public class ContainerRegistryApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @param tagName the name of the tag to delete * @throws GitLabApiException if any exception occurs */ - public void deleteRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) throws GitLabApiException { + public void deleteRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) throws GitLabApiException { if (repositoryId == null) { throw new RuntimeException("repositoryId cannot be null"); @@ -241,7 +241,7 @@ public class ContainerRegistryApi extends AbstractApi { * These operations are executed asynchronously and it might take time to get executed. You can run this at most * once an hour for a given container repository. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param repositoryId the ID of registry repository * @param nameRegex the regex of the name to delete. To delete all tags specify .*. * @param keepN the amount of latest tags of given name to keep. @@ -249,7 +249,7 @@ public class ContainerRegistryApi extends AbstractApi { * 1h, 1d, 1month. * @throws GitLabApiException if any exception occurs */ - public void deleteRepositoryTags(Object projectIdOrPath, Integer repositoryId, String nameRegex, Integer keepN, String olderThan) throws GitLabApiException { + public void deleteRepositoryTags(Object projectIdOrPath, Long repositoryId, String nameRegex, Integer keepN, String olderThan) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("name_regex", nameRegex, true) diff --git a/src/main/java/org/gitlab4j/api/DeployKeysApi.java b/src/main/java/org/gitlab4j/api/DeployKeysApi.java index c310c3c5..c8525956 100644 --- a/src/main/java/org/gitlab4j/api/DeployKeysApi.java +++ b/src/main/java/org/gitlab4j/api/DeployKeysApi.java @@ -77,7 +77,7 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of DeployKey * @throws GitLabApiException if any exception occurs */ @@ -91,7 +91,7 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of deploy keys per page * @return the list of DeployKey in the specified range @@ -108,7 +108,7 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the project + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance@param projectId the ID of the project * @param itemsPerPage the number of DeployKey instances that will be fetched per page * @return a Pager of DeployKey * @throws GitLabApiException if any exception occurs @@ -123,7 +123,7 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of DeployKey * @throws GitLabApiException if any exception occurs */ @@ -136,12 +136,12 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param keyId the ID of the deploy key to delete * @return the DeployKey instance for the specified project ID and key ID * @throws GitLabApiException if any exception occurs */ - public DeployKey getDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { + public DeployKey getDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); @@ -157,11 +157,11 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param keyId the ID of the deploy key to delete * @return the DeployKey for the specified project ID and key ID as an Optional instance */ - public Optional getOptionalDeployKey(Object projectIdOrPath, Integer keyId) { + public Optional getOptionalDeployKey(Object projectIdOrPath, Long keyId) { try { return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId))); } catch (GitLabApiException glae) { @@ -174,7 +174,7 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/deploy_keys
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param title the new deploy key's title, required * @param key the new deploy key, required * @param canPush can deploy key push to the project's repository, optional @@ -197,14 +197,14 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/deploy_keys/:key_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deployKeyId the ID of the deploy key to update, required * @param title the title for the deploy key, optional * @param canPush can deploy key push to the project's repository, optional * @return an updated DeployKey instance * @throws GitLabApiException if any exception occurs */ - public DeployKey updateDeployKey(Object projectIdOrPath, Integer deployKeyId, String title, Boolean canPush) throws GitLabApiException { + public DeployKey updateDeployKey(Object projectIdOrPath, Long deployKeyId, String title, Boolean canPush) throws GitLabApiException { if (deployKeyId == null) { throw new RuntimeException("deployKeyId cannot be null"); @@ -224,11 +224,11 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param keyId the ID of the deploy key to delete * @throws GitLabApiException if any exception occurs */ - public void deleteDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { + public void deleteDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); @@ -242,12 +242,12 @@ public class DeployKeysApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param keyId the ID of the deploy key to enable * @return an DeployKey instance with info on the enabled deploy key * @throws GitLabApiException if any exception occurs */ - public DeployKey enableDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { + public DeployKey enableDeployKey(Object projectIdOrPath, Long keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); diff --git a/src/main/java/org/gitlab4j/api/DeployTokensApi.java b/src/main/java/org/gitlab4j/api/DeployTokensApi.java index a5995eb1..214089f1 100644 --- a/src/main/java/org/gitlab4j/api/DeployTokensApi.java +++ b/src/main/java/org/gitlab4j/api/DeployTokensApi.java @@ -26,7 +26,7 @@ public class DeployTokensApi extends AbstractApi { /** * Get a list of all deploy tokens across the GitLab instance. This endpoint requires admin access. - * + * *
GitLab Endpoint: GET /deploy_tokens
* * @return a list of DeployToken @@ -70,7 +70,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_tokens
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of DeployToken * @throws GitLabApiException if any exception occurs */ @@ -83,7 +83,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_tokens
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the project + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance@param projectId the ID of the project * @param itemsPerPage the number of DeployToken instances that will be fetched per page * @return a Pager of DeployToken * @throws GitLabApiException if any exception occurs @@ -98,7 +98,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deploy_tokens
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of DeployToken * @throws GitLabApiException if any exception occurs */ @@ -111,7 +111,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/deploy_tokens
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the new deploy token’s name, required * @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided. * @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n} @@ -132,14 +132,14 @@ public class DeployTokensApi extends AbstractApi { /** * Removes a deploy token from the group. - * + * *
GitLab Endpoint: DELETE /projects/:id/deploy_tokens/:token_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param tokenId the ID of the deploy token to delete * @throws GitLabApiException if any exception occurs */ - public void deleteProjectDeployToken(Object projectIdOrPath, Integer tokenId) throws GitLabApiException { + public void deleteProjectDeployToken(Object projectIdOrPath, Long tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); @@ -157,7 +157,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/deploy_tokens
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a list of DeployToken * @throws GitLabApiException if any exception occurs */ @@ -170,7 +170,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/deploy_tokens
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance@param groupId the ID of the group + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance@param groupId the ID of the group * @param itemsPerPage the number of DeployToken instances that will be fetched per page * @return a Pager of DeployToken * @throws GitLabApiException if any exception occurs @@ -185,7 +185,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/deploy_tokens
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a list of DeployToken * @throws GitLabApiException if any exception occurs */ @@ -198,7 +198,7 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: POST /groups/:id/deploy_tokens
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param name the new deploy token’s name, required * @param expiresAt expiration date for the deploy token. Currently documented as not required but api fails if not provided. Does not expire if no value is provided. * @param username the username for deploy token. Currently documented as not required but api fails if not provided. Default is gitlab+deploy-token-{n} @@ -222,11 +222,11 @@ public class DeployTokensApi extends AbstractApi { * *
GitLab Endpoint: DELETE /groups/:id/deploy_tokens/:token_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param tokenId the ID of the deploy token to delete * @throws GitLabApiException if any exception occurs */ - public void deleteGroupDeployToken(Object groupIdOrPath, Integer tokenId) throws GitLabApiException { + public void deleteGroupDeployToken(Object groupIdOrPath, Long tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); diff --git a/src/main/java/org/gitlab4j/api/DeploymentsApi.java b/src/main/java/org/gitlab4j/api/DeploymentsApi.java index 9ea9d524..8dc46990 100644 --- a/src/main/java/org/gitlab4j/api/DeploymentsApi.java +++ b/src/main/java/org/gitlab4j/api/DeploymentsApi.java @@ -26,7 +26,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of Deployments * @throws GitLabApiException if any exception occurs */ @@ -39,7 +39,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Deployments instances that will be fetched per page * @return a Pager of Deployment * @throws GitLabApiException if any exception occurs @@ -53,7 +53,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @return a Pager of Deployment * @throws GitLabApiException if any exception occurs @@ -67,7 +67,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @param itemsPerPage the number of Deployments instances that will be fetched per page * @return a Pager of Deployment @@ -84,7 +84,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of Deployment * @throws GitLabApiException if any exception occurs */ @@ -97,7 +97,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings * @return a list of Deployment * @throws GitLabApiException if any exception occurs @@ -111,12 +111,12 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId the ID of a project's deployment * @return the specified Deployment instance * @throws GitLabApiException if any exception occurs */ - public Deployment getDeployment(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { + public Deployment getDeployment(Object projectIdOrPath, Long deploymentId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId); return (response.readEntity(Deployment.class)); @@ -127,11 +127,11 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId the ID of a project's deployment * @return the specified Deployment as an Optional instance */ - public Optional getOptionalDeployment(Object projectIdOrPath, Integer deploymentId) { + public Optional getOptionalDeployment(Object projectIdOrPath, Long deploymentId) { try { return (Optional.ofNullable(getDeployment(projectIdOrPath, deploymentId))); } catch (GitLabApiException glae) { @@ -144,7 +144,7 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/deployments
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param environment The name of the environment to create the deployment for, required * @param sha The SHA of the commit that is deployed, required * @param ref The name of the branch or tag that is deployed, required @@ -172,13 +172,13 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/deployments/:key_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId The ID of the deployment to update, required * @param status The new status of the deployment, required * @return an updated Deployment instance * @throws GitLabApiException if any exception occurs */ - public Deployment updateDeployment(Object projectIdOrPath, Integer deploymentId, DeploymentStatus status) throws GitLabApiException { + public Deployment updateDeployment(Object projectIdOrPath, Long deploymentId, DeploymentStatus status) throws GitLabApiException { if (deploymentId == null) { throw new RuntimeException("deploymentId cannot be null"); @@ -197,12 +197,12 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId The ID of the deployment to update, required * @return a list containing the MergeRequest instances shipped with a given deployment * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ - public List getMergeRequests(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { + public List getMergeRequests(Object projectIdOrPath, Long deploymentId) throws GitLabApiException { return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).all()); } @@ -211,13 +211,13 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId The ID of the deployment to update, required * @param itemsPerPage the number of Commit instances that will be fetched per page * @return a Pager containing the MergeRequest instances shipped with a given deployment * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ - public Pager getMergeRequests(Object projectIdOrPath, Integer deploymentId, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequests(Object projectIdOrPath, Long deploymentId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, MergeRequest.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", deploymentId, "merge_requests")); } @@ -227,12 +227,12 @@ public class DeploymentsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param deploymentId The ID of the deployment to update, required * @return a Stream containing the MergeRequest instances shipped with a given deployment * @throws GitLabApiException GitLabApiException if any exception occurs during execution */ - public Stream getMergeRequestsStream(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { + public Stream getMergeRequestsStream(Object projectIdOrPath, Long deploymentId) throws GitLabApiException { return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).stream()); } diff --git a/src/main/java/org/gitlab4j/api/DiscussionsApi.java b/src/main/java/org/gitlab4j/api/DiscussionsApi.java index 02f38c1c..687d5a83 100644 --- a/src/main/java/org/gitlab4j/api/DiscussionsApi.java +++ b/src/main/java/org/gitlab4j/api/DiscussionsApi.java @@ -27,12 +27,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of the issue * @return a list containing all the discussions for the specified issue * @throws GitLabApiException if any exception occurs during execution */ - public List getIssueDiscussions(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueDiscussions(Object projectIdOrPath, Long issueIid) throws GitLabApiException { Pager pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage()); return (pager.all()); } @@ -42,13 +42,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of the issue * @param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the issue * @return a list containing the discussions for the specified issue * @throws GitLabApiException if any exception occurs during execution */ - public List getIssueDiscussions(Object projectIdOrPath, Integer issueIid, int maxItems) throws GitLabApiException { + public List getIssueDiscussions(Object projectIdOrPath, Long issueIid, int maxItems) throws GitLabApiException { if (maxItems < 1) { return (getIssueDiscussions(projectIdOrPath, issueIid)); } else { @@ -63,13 +63,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of the issue * @param itemsPerPage the number of Discussion instances that will be fetched per page * @return a Pager containing the Discussion instances for the specified issue * @throws GitLabApiException if any exception occurs during execution */ - public Pager getIssueDiscussionsPager(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getIssueDiscussionsPager(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Discussion.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions")); } @@ -79,12 +79,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of the issue * @return a Stream instance containing the Discussion instances for the specified issue * @throws GitLabApiException if any exception occurs during execution */ - public Stream getIssueDiscussionsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getIssueDiscussionsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { Pager pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage()); return (pager.stream()); } @@ -94,12 +94,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param snippetId the ID of the snippet * @return a list containing all the discussions for the specified snippet * @throws GitLabApiException if any exception occurs during execution */ - public List getSnippetDiscussions(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public List getSnippetDiscussions(Object projectIdOrPath, Long snippetId) throws GitLabApiException { Pager pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage()); return (pager.all()); } @@ -109,13 +109,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param snippetId the ID of the snippet * @param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the snippet * @return a list containing the discussions for the specified snippet * @throws GitLabApiException if any exception occurs during execution */ - public List getSnippetDiscussions(Object projectIdOrPath, Integer snippetId, int maxItems) throws GitLabApiException { + public List getSnippetDiscussions(Object projectIdOrPath, Long snippetId, int maxItems) throws GitLabApiException { if (maxItems < 1) { return (getSnippetDiscussions(projectIdOrPath, snippetId)); } else { @@ -130,13 +130,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param snippetId the ID of the snippet * @param itemsPerPage the number of Discussion instances that will be fetched per page * @return a Pager containing the Discussion instances for the specified snippet * @throws GitLabApiException if any exception occurs during execution */ - public Pager getSnippetDiscussionsPager(Object projectIdOrPath, Integer snippetId, int itemsPerPage) throws GitLabApiException { + public Pager getSnippetDiscussionsPager(Object projectIdOrPath, Long snippetId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Discussion.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "discussions")); } @@ -146,12 +146,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param snippetId the ID of the snippet * @return a Stream instance containing the Discussion instances for the specified snippet * @throws GitLabApiException if any exception occurs during execution */ - public Stream getSnippetDiscussionsStream(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public Stream getSnippetDiscussionsStream(Object projectIdOrPath, Long snippetId) throws GitLabApiException { Pager pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage()); return (pager.stream()); } @@ -162,12 +162,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param epicId the internal ID of the epic * @return a list containing all the discussions for the specified epic * @throws GitLabApiException if any exception occurs during execution */ - public List getEpicDiscussions(Object projectIdOrPath, Integer epicId) throws GitLabApiException { + public List getEpicDiscussions(Object projectIdOrPath, Long epicId) throws GitLabApiException { Pager pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage()); return (pager.all()); } @@ -177,13 +177,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param epicId the internal ID of the epic * @param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the epic * @return a list containing the discussions for the specified epic * @throws GitLabApiException if any exception occurs during execution */ - public List getEpicDiscussions(Object projectIdOrPath, Integer epicId, int maxItems) throws GitLabApiException { + public List getEpicDiscussions(Object projectIdOrPath, Long epicId, int maxItems) throws GitLabApiException { if (maxItems < 1) { return (getEpicDiscussions(projectIdOrPath, epicId)); } else { @@ -198,13 +198,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param epicId the internal ID of the epic * @param itemsPerPage the number of Discussion instances that will be fetched per page * @return a Pager containing the Discussion instances for the specified epic * @throws GitLabApiException if any exception occurs during execution */ - public Pager getEpicDiscussionsPager(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException { + public Pager getEpicDiscussionsPager(Object projectIdOrPath, Long epicId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Discussion.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "discussions")); } @@ -214,12 +214,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param epicId the internal ID of the epic * @return a Stream instance containing the Discussion instances for the specified epic * @throws GitLabApiException if any exception occurs during execution */ - public Stream getEpicDiscussionsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException { + public Stream getEpicDiscussionsStream(Object projectIdOrPath, Long epicId) throws GitLabApiException { Pager pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage()); return (pager.stream()); } @@ -229,12 +229,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a list containing all the discussions for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public List getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestDiscussions(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Pager pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage()); return (pager.all()); } @@ -244,13 +244,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the merge request * @return a list containing the discussions for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public List getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid, int maxItems) throws GitLabApiException { + public List getMergeRequestDiscussions(Object projectIdOrPath, Long mergeRequestIid, int maxItems) throws GitLabApiException { if (maxItems < 1) { return (getMergeRequestDiscussions(projectIdOrPath, mergeRequestIid)); } else { @@ -265,13 +265,13 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param itemsPerPage the number of Discussion instances that will be fetched per page * @return a Pager containing the Discussion instances for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public Pager getMergeRequestDiscussionsPager(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequestDiscussionsPager(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Discussion.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions")); } @@ -281,12 +281,12 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Stream instance containing the Discussion instances for the specified issue * @throws GitLabApiException if any exception occurs during execution */ - public Stream getMergeRequestDiscussionsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getMergeRequestDiscussionsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Pager pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage()); return (pager.stream()); } @@ -297,7 +297,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param body the content of a discussion * @param createdAt date the discussion was created (requires admin or project/group owner rights) @@ -306,7 +306,7 @@ public class DiscussionsApi extends AbstractApi { * @return a Discussion instance containing the newly created discussion * @throws GitLabApiException if any exception occurs during execution */ - public Discussion createMergeRequestDiscussion(Object projectIdOrPath, Integer mergeRequestIid, + public Discussion createMergeRequestDiscussion(Object projectIdOrPath, Long mergeRequestIid, String body, Date createdAt, String positionHash, Position position) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -339,14 +339,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param discussionId the ID of a discussion * @param resolved resolve/unresolve the discussion * @return the updated DIscussion instance * @throws GitLabApiException if any exception occurs during execution */ - public Discussion resolveMergeRequestDiscussion(Object projectIdOrPath, Integer mergeRequestIid, + public Discussion resolveMergeRequestDiscussion(Object projectIdOrPath, Long mergeRequestIid, String discussionId, Boolean resolved) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("resolved", resolved, true); Response response = put(Response.Status.OK, formData.asMap(), @@ -359,14 +359,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param discussionId the ID of a discussion * @param noteId the note ID to delete * @throws GitLabApiException if any exception occurs during execution */ - public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Integer mergeRequestIid, - String discussionId, Integer noteId) throws GitLabApiException { + public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Long mergeRequestIid, + String discussionId, Long noteId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId); } @@ -376,7 +376,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @return a list containing all the discussions for the specified commit * @throws GitLabApiException if any exception occurs during execution @@ -391,7 +391,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the commit * @return a list containing the discussions for the specified commit @@ -412,7 +412,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @param itemsPerPage the number of Discussion instances that will be fetched per page * @return a Pager containing the Discussion instances for the specified commit @@ -428,7 +428,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @return a Stream instance containing the Discussion instances for the specified commit * @throws GitLabApiException if any exception occurs during execution @@ -443,7 +443,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @param discussionId the ID of the discussion * @return the Discussion instance specified by discussionId for the specified commit @@ -460,7 +460,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the SHA of the commit to get discussions for * @param discussionId the ID of the discussion * @return an Optional instance with the specified Discussion instance as a value @@ -479,7 +479,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the commit SHA to create the discussion for * @param body the content of a discussion * @param createdAt date the discussion was created (requires admin or project/group owner rights) @@ -522,7 +522,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the commit SHA to create the discussion for * @param discussionId the ID of a discussion * @param body the content of a discussion @@ -548,7 +548,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the commit SHA to delete the discussion from * @param discussionId the ID of a discussion * @param noteId the note ID to modify @@ -557,7 +557,7 @@ public class DiscussionsApi extends AbstractApi { * @throws GitLabApiException if any exception occurs during execution */ public Note modifyCommitDiscussionNote(Object projectIdOrPath, - String commitSha, String discussionId, Integer noteId, String body) throws GitLabApiException { + String commitSha, String discussionId, Long noteId, String body) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true); Response response = this.putWithFormData(Response.Status.OK, formData, @@ -571,7 +571,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the commit SHA to delete the discussion from * @param discussionId the ID of a discussion * @param noteId the note ID to resolve or unresolve @@ -580,7 +580,7 @@ public class DiscussionsApi extends AbstractApi { * @throws GitLabApiException if any exception occurs during execution */ public Note resolveCommitDiscussionNote(Object projectIdOrPath, - String commitSha, String discussionId, Integer noteId, Boolean resolved) throws GitLabApiException { + String commitSha, String discussionId, Long noteId, Boolean resolved) throws GitLabApiException { GitLabApiForm queryParams = new GitLabApiForm().withParam("resolved", resolved); Response response = this.put(Response.Status.OK, queryParams.asMap(), @@ -594,14 +594,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitSha the commit SHA to delete the discussion from * @param discussionId the ID of a discussion * @param noteId the note ID to delete * @throws GitLabApiException if any exception occurs during execution */ public void deleteCommitDiscussionNote(Object projectIdOrPath, String commitSha, - String discussionId, Integer noteId) throws GitLabApiException { + String discussionId, Long noteId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", commitSha, "discussions", discussionId, "notes", noteId); } @@ -611,7 +611,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param discussionId the ID of a discussion * @param body the content of a discussion @@ -619,7 +619,7 @@ public class DiscussionsApi extends AbstractApi { * @return a Note instance containing the newly created discussion note * @throws GitLabApiException if any exception occurs during execution */ - public Note addMergeRequestThreadNote(Object projectIdOrPath, Integer mergeRequestIid, + public Note addMergeRequestThreadNote(Object projectIdOrPath, Long mergeRequestIid, String discussionId, String body, Date createdAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -636,7 +636,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param discussionId the ID of a discussion * @param noteId the note ID to modify @@ -645,8 +645,8 @@ public class DiscussionsApi extends AbstractApi { * @return a Note instance containing the updated discussion note * @throws GitLabApiException if any exception occurs during execution */ - public Note modifyMergeRequestThreadNote(Object projectIdOrPath, Integer mergeRequestIid, - String discussionId, Integer noteId, String body, Boolean resolved) throws GitLabApiException { + public Note modifyMergeRequestThreadNote(Object projectIdOrPath, Long mergeRequestIid, + String discussionId, Long noteId, String body, Boolean resolved) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("body", body).withParam("resolved", resolved); Response response = this.putWithFormData(Response.Status.OK, formData, @@ -660,14 +660,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid mergeRequestIid the internal ID of the merge request * @param discussionId the ID of a discussion * @param noteId the note ID to delete * @throws GitLabApiException if any exception occurs during execution */ - public void deleteMergeRequestThreadNote(Object projectIdOrPath, Integer mergeRequestIid, - String discussionId, Integer noteId) throws GitLabApiException { + public void deleteMergeRequestThreadNote(Object projectIdOrPath, Long mergeRequestIid, + String discussionId, Long noteId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId); } @@ -677,14 +677,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid The IID of an issue * @param body the content of the discussion * @param createdAt (optional) date the discussion was created (requires admin or project/group owner rights) * @return a Discussion instance containing the newly created discussion * @throws GitLabApiException if any exception occurs during execution */ - public Discussion createIssueDiscussion(Object projectIdOrPath, Integer issueIid, String body, Date createdAt) throws GitLabApiException { + public Discussion createIssueDiscussion(Object projectIdOrPath, Long issueIid, String body, Date createdAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("body", body, true) .withParam("created_at", createdAt); @@ -698,7 +698,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid The IID of an issue * @param discussionId the id of discussion * @param body the content of the note @@ -706,7 +706,7 @@ public class DiscussionsApi extends AbstractApi { * @return a Note instance containing the newly created note * @throws GitLabApiException if any exception occurs during execution */ - public Note addIssueThreadNote(Object projectIdOrPath, Integer issueIid, + public Note addIssueThreadNote(Object projectIdOrPath, Long issueIid, String discussionId, String body, Date createdAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("body", body, true) @@ -721,7 +721,7 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid The IID of an issue * @param discussionId the id of discussion * @param noteId the id of the note @@ -729,8 +729,8 @@ public class DiscussionsApi extends AbstractApi { * @return a Note instance containing the modified note * @throws GitLabApiException if any exception occurs during execution */ - public Note modifyIssueThreadNote(Object projectIdOrPath, Integer issueIid, - String discussionId, Integer noteId, String body) throws GitLabApiException { + public Note modifyIssueThreadNote(Object projectIdOrPath, Long issueIid, + String discussionId, Long noteId, String body) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("body", body, true); Response response = putWithFormData(Response.Status.OK, formData, @@ -743,14 +743,14 @@ public class DiscussionsApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid The IID of an issue * @param discussionId the id of discussion * @param noteId the id of the note * @throws GitLabApiException if any exception occurs during execution */ - public void deleteIssueThreadNote(Object projectIdOrPath, Integer issueIid, - String discussionId, Integer noteId) throws GitLabApiException { + public void deleteIssueThreadNote(Object projectIdOrPath, Long issueIid, + String discussionId, Long noteId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions", discussionId, "notes", noteId); } diff --git a/src/main/java/org/gitlab4j/api/EnvironmentsApi.java b/src/main/java/org/gitlab4j/api/EnvironmentsApi.java index 607f05cd..6eca5127 100644 --- a/src/main/java/org/gitlab4j/api/EnvironmentsApi.java +++ b/src/main/java/org/gitlab4j/api/EnvironmentsApi.java @@ -69,7 +69,7 @@ public class EnvironmentsApi extends AbstractApi { * @return an Environment instance * @throws GitLabApiException if any exception occurs */ - public Environment getEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { + public Environment getEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); return (response.readEntity(Environment.class)); @@ -84,7 +84,7 @@ public class EnvironmentsApi extends AbstractApi { * @param environmentId the ID of the environment to get * @return the Environment as an Optional instance */ - public Optional getOptionalEnvironment(Object projectIdOrPath, Integer environmentId) { + public Optional getOptionalEnvironment(Object projectIdOrPath, Long environmentId) { try { return (Optional.ofNullable(getEnvironment(projectIdOrPath, environmentId))); } catch (GitLabApiException glae) { @@ -122,7 +122,7 @@ public class EnvironmentsApi extends AbstractApi { * @return the created Environment instance * @throws GitLabApiException if any exception occurs */ - public Environment updateEnvironment(Object projectIdOrPath, Integer environmentId, String name, String externalUrl) throws GitLabApiException { + public Environment updateEnvironment(Object projectIdOrPath, Long environmentId, String name, String externalUrl) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("name", name).withParam("external_url", externalUrl); Response response = putWithFormData(Response.Status.OK, formData, formData, "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); @@ -139,7 +139,7 @@ public class EnvironmentsApi extends AbstractApi { * @return the stopped Environment instance * @throws GitLabApiException if any exception occurs */ - public Environment stopEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { + public Environment stopEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException { Response response = post(Response.Status.OK, (GitLabApiForm) null, "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); return (response.readEntity(Environment.class)); @@ -154,7 +154,7 @@ public class EnvironmentsApi extends AbstractApi { * @param environmentId the ID of the environment to delete * @throws GitLabApiException if any exception occurs */ - public void deleteEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { + public void deleteEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); } @@ -169,7 +169,7 @@ public class EnvironmentsApi extends AbstractApi { * @return the Environment instance of the stopped environment * @throws GitLabApiException if any exception occurs */ - public Environment createEnvironment(Object projectIdOrPath, Integer environmentId) throws GitLabApiException { + public Environment createEnvironment(Object projectIdOrPath, Long environmentId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm(); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); diff --git a/src/main/java/org/gitlab4j/api/EpicsApi.java b/src/main/java/org/gitlab4j/api/EpicsApi.java index 99c3268e..6eb59a1c 100644 --- a/src/main/java/org/gitlab4j/api/EpicsApi.java +++ b/src/main/java/org/gitlab4j/api/EpicsApi.java @@ -14,11 +14,11 @@ import org.gitlab4j.api.models.EpicIssue; /** * This class implements the client side API for the GitLab Epics and Epic Issues API calls. - * + * * NOTE: * - If a user is not a member of a group and the group is private, a GET request on that group will result to a 404 status code. * - Epics are available only in Ultimate. If epics feature is not available a 403 status code will be returned. - * + * * @see GitLab Epics API Documentaion * @see GitLab Epic Issues API Documentation */ @@ -86,7 +86,7 @@ public class EpicsApi extends AbstractApi { /** * Gets all epics of the requested group and its subgroups. - * + * *
GitLab Endpoint: GET /groups/:id/epics
* * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @@ -99,7 +99,7 @@ public class EpicsApi extends AbstractApi { * @return a list of matching epics of the requested group and its subgroups * @throws GitLabApiException if any exception occurs */ - public List getEpics(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, + public List getEpics(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search) throws GitLabApiException { return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).all()); } @@ -121,7 +121,7 @@ public class EpicsApi extends AbstractApi { * @return a list of matching epics of the requested group and its subgroups in the specified range * @throws GitLabApiException if any exception occurs */ - public List getEpics(Object groupIdOrPath, Integer authorId, String labels, + public List getEpics(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm(page, perPage) .withParam("author_id", authorId) @@ -149,7 +149,7 @@ public class EpicsApi extends AbstractApi { * @return the Pager of matching epics of the requested group and its subgroups * @throws GitLabApiException if any exception occurs */ - public Pager getEpics(Object groupIdOrPath, Integer authorId, String labels, + public Pager getEpics(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("author_id", authorId) @@ -175,7 +175,7 @@ public class EpicsApi extends AbstractApi { * @return a Stream of matching epics of the requested group and its subgroups * @throws GitLabApiException if any exception occurs */ - public Stream getEpicsStream(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, + public Stream getEpicsStream(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search) throws GitLabApiException { return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).stream()); } @@ -190,7 +190,7 @@ public class EpicsApi extends AbstractApi { * @return an Epic instance for the specified Epic * @throws GitLabApiException if any exception occurs */ - public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { + public Epic getEpic(Object groupIdOrPath, Long epicIid) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid); return (response.readEntity(Epic.class)); } @@ -204,7 +204,7 @@ public class EpicsApi extends AbstractApi { * @param epicIid the IID of the epic to get * @return an Optional instance with the specified Epic as a value */ - public Optional getOptionalEpic(Object groupIdOrPath, Integer epicIid) { + public Optional getOptionalEpic(Object groupIdOrPath, Long epicIid) { try { return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid))); } catch (GitLabApiException glae) { @@ -240,14 +240,14 @@ public class EpicsApi extends AbstractApi { } /** - * Creates a new epic using the information contained in the provided Epic instance. Only the following + * Creates a new epic using the information contained in the provided Epic instance. Only the following * fields from the Epic instance are used: *

      *      title - the title of the epic (required)
      *      labels - comma separated list of labels (optional)
      *      description - the description of the epic (optional)
      *      startDate - the start date of the epic (optional)
-     *      endDate - the end date of the epic (optional) 
+     *      endDate - the end date of the epic (optional)
      * 
* *
GitLab Endpoint: POST /groups/:id/epics
@@ -284,7 +284,7 @@ public class EpicsApi extends AbstractApi { * @return an Epic instance containing info on the newly created epic * @throws GitLabApiException if any exception occurs */ - public Epic updateEpic(Object groupIdOrPath, Integer epicIid, String title, String labels, String description, + public Epic updateEpic(Object groupIdOrPath, Long epicIid, String title, String labels, String description, Date startDate, Date endDate) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("title", title, true) @@ -298,14 +298,14 @@ public class EpicsApi extends AbstractApi { } /** - * Updates an epic using the information contained in the provided Epic instance. Only the following + * Updates an epic using the information contained in the provided Epic instance. Only the following * fields from the Epic instance are used: *

      *      title - the title of the epic (optional)
      *      labels - comma separated list of labels (optional)
      *      description - the description of the epic (optional)
      *      startDate - the start date of the epic (optional)
-     *      endDate - the end date of the epic (optional) 
+     *      endDate - the end date of the epic (optional)
      * 
*
GitLab Endpoint: PUT /groups/:id/epics/:epic_iid
* @@ -315,7 +315,7 @@ public class EpicsApi extends AbstractApi { * @return an Epic instance containing info on the updated epic * @throws GitLabApiException if any exception occurs */ - public Epic updateEpic(Object groupIdOrPath, Integer epicIid, Epic epic) throws GitLabApiException { + public Epic updateEpic(Object groupIdOrPath, Long epicIid, Epic epic) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("title", epic.getTitle(), true) .withParam("labels", epic.getLabels()) @@ -336,7 +336,7 @@ public class EpicsApi extends AbstractApi { * @param epicIid the IID of the epic to delete * @throws GitLabApiException if any exception occurs */ - public void deleteEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { + public void deleteEpic(Object groupIdOrPath, Long epicIid) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid); } @@ -350,7 +350,7 @@ public class EpicsApi extends AbstractApi { * @return a list of all epic issues belonging to the specified epic * @throws GitLabApiException if any exception occurs */ - public List getEpicIssues(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { + public List getEpicIssues(Object groupIdOrPath, Long epicIid) throws GitLabApiException { return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all()); } @@ -367,7 +367,7 @@ public class EpicsApi extends AbstractApi { * @return a list of all epic issues belonging to the specified epic in the specified range * @throws GitLabApiException if any exception occurs */ - public List getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException { + public List getEpicIssues(Object groupIdOrPath, Long epicIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"); return (response.readEntity(new GenericType>() { })); } @@ -383,7 +383,7 @@ public class EpicsApi extends AbstractApi { * @return the Pager of all epic issues belonging to the specified epic * @throws GitLabApiException if any exception occurs */ - public Pager getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException { + public Pager getEpicIssues(Object groupIdOrPath, Long epicIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues")); } @@ -397,7 +397,7 @@ public class EpicsApi extends AbstractApi { * @return a Stream of all epic issues belonging to the specified epic * @throws GitLabApiException if any exception occurs */ - public Stream getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { + public Stream getEpicIssuesStream(Object groupIdOrPath, Long epicIid) throws GitLabApiException { return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream()); } @@ -413,7 +413,7 @@ public class EpicsApi extends AbstractApi { * @return an EpicIssue instance containing info on the newly assigned epic issue * @throws GitLabApiException if any exception occurs */ - public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { + public EpicIssue assignIssue(Object groupIdOrPath, Long epicIid, Long issueIid) throws GitLabApiException { Response response = post(Response.Status.CREATED, (Form)null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); @@ -430,7 +430,7 @@ public class EpicsApi extends AbstractApi { * @return an EpicIssue instance containing info on the removed issue * @throws GitLabApiException if any exception occurs */ - public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { + public EpicIssue removeIssue(Object groupIdOrPath, Long epicIid, Long issueIid) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); @@ -449,7 +449,7 @@ public class EpicsApi extends AbstractApi { * @return an EpicIssue instance containing info on the newly assigned epic issue * @throws GitLabApiException if any exception occurs */ - public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException { + public EpicIssue updateIssue(Object groupIdOrPath, Long epicIid, Long issueIid, Long moveBeforeId, Long moveAfterId) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm() .withParam("move_before_id", moveBeforeId) .withParam("move_after_id", moveAfterId); diff --git a/src/main/java/org/gitlab4j/api/EventsApi.java b/src/main/java/org/gitlab4j/api/EventsApi.java index 0a01cb0c..b4bed04d 100644 --- a/src/main/java/org/gitlab4j/api/EventsApi.java +++ b/src/main/java/org/gitlab4j/api/EventsApi.java @@ -296,7 +296,7 @@ public class EventsApi extends AbstractApi { * *
GitLab Endpoint: GET /:projectId/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param action include only events of a particular action type, optional * @param targetType include only events of a particular target type, optional * @param before include only events created before a particular date, optional @@ -315,7 +315,7 @@ public class EventsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:projectId/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param action include only events of a particular action type, optional * @param targetType include only events of a particular target type, optional * @param before include only events created before a particular date, optional @@ -326,7 +326,7 @@ public class EventsApi extends AbstractApi { * @return a list of events for the specified project and matching the supplied parameters * @throws GitLabApiException if any exception occurs */ - public List getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType, + public List getProjectEvents(Long projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -348,7 +348,7 @@ public class EventsApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:projectId/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param action include only events of a particular action type, optional * @param targetType include only events of a particular target type, optional * @param before include only events created before a particular date, optional @@ -358,7 +358,7 @@ public class EventsApi extends AbstractApi { * @return a Pager of events for the specified project and matching the supplied parameters * @throws GitLabApiException if any exception occurs */ - public Pager getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, + public Pager getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -377,7 +377,7 @@ public class EventsApi extends AbstractApi { * *
GitLab Endpoint: GET /:projectId/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param action include only events of a particular action type, optional * @param targetType include only events of a particular target type, optional * @param before include only events created before a particular date, optional diff --git a/src/main/java/org/gitlab4j/api/GitLabApi.java b/src/main/java/org/gitlab4j/api/GitLabApi.java index d2f9274a..051b7367 100644 --- a/src/main/java/org/gitlab4j/api/GitLabApi.java +++ b/src/main/java/org/gitlab4j/api/GitLabApi.java @@ -449,7 +449,7 @@ public class GitLabApi implements AutoCloseable { */ public final GitLabApi duplicate() { - Integer sudoUserId = this.getSudoAsId(); + Long sudoUserId = this.getSudoAsId(); GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl, getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties); if (sudoUserId != null) { @@ -661,7 +661,7 @@ public class GitLabApi implements AutoCloseable { throw new GitLabApiException("the specified username was not found"); } - Integer sudoAsId = user.getId(); + Long sudoAsId = user.getId(); apiClient.setSudoAsId(sudoAsId); } @@ -679,7 +679,7 @@ public class GitLabApi implements AutoCloseable { * @param sudoAsId the ID of the user to sudo as, null will turn off sudo * @throws GitLabApiException if any exception occurs */ - public void setSudoAsId(Integer sudoAsId) throws GitLabApiException { + public void setSudoAsId(Long sudoAsId) throws GitLabApiException { if (sudoAsId == null) { apiClient.setSudoAsId(null); @@ -700,7 +700,7 @@ public class GitLabApi implements AutoCloseable { * * @return the current sudo as ID, will return null if not in sudo mode */ - public Integer getSudoAsId() { + public Long getSudoAsId() { return (apiClient.getSudoAsId()); } diff --git a/src/main/java/org/gitlab4j/api/GitLabApiClient.java b/src/main/java/org/gitlab4j/api/GitLabApiClient.java index 509dc192..3322e8ba 100755 --- a/src/main/java/org/gitlab4j/api/GitLabApiClient.java +++ b/src/main/java/org/gitlab4j/api/GitLabApiClient.java @@ -68,7 +68,7 @@ public class GitLabApiClient implements AutoCloseable { private boolean ignoreCertificateErrors; private SSLContext openSslContext; private HostnameVerifier openHostnameVerifier; - private Integer sudoAsId; + private Long sudoAsId; private Integer connectTimeout; private Integer readTimeout; @@ -322,7 +322,7 @@ public class GitLabApiClient implements AutoCloseable { * Set the ID of the user to sudo as. * */ - Integer getSudoAsId() { + Long getSudoAsId() { return (sudoAsId); } @@ -331,7 +331,7 @@ public class GitLabApiClient implements AutoCloseable { * * @param sudoAsId the ID of the user to sudo as */ - void setSudoAsId(Integer sudoAsId) { + void setSudoAsId(Long sudoAsId) { this.sudoAsId = sudoAsId; } @@ -917,7 +917,8 @@ public class GitLabApiClient implements AutoCloseable { // Ignore differences between given hostname and certificate hostname HostnameVerifier hostnameVerifier = new HostnameVerifier() { - public boolean verify(String hostname, SSLSession session) { + @Override + public boolean verify(String hostname, SSLSession session) { return true; } }; diff --git a/src/main/java/org/gitlab4j/api/GroupApi.java b/src/main/java/org/gitlab4j/api/GroupApi.java index b4d9f959..ff8ec1a0 100644 --- a/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/src/main/java/org/gitlab4j/api/GroupApi.java @@ -557,7 +557,7 @@ public class GroupApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public Group addGroup(String name, String path, String description, Visibility visibility, - Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId) throws GitLabApiException { + Boolean lfsEnabled, Boolean requestAccessEnabled, Long parentId) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("name", name, true) @@ -610,7 +610,7 @@ public class GroupApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Visibility visibility, - Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId) throws GitLabApiException { + Boolean lfsEnabled, Boolean requestAccessEnabled, Long parentId) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("name", name) @@ -644,9 +644,10 @@ public class GroupApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #addGroup(String, String, String, Visibility, * Boolean, Boolean, Integer)} */ - public Group addGroup(String name, String path, String description, Boolean membershipLock, + @Deprecated + public Group addGroup(String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, - Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { + Long parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("name", name) @@ -684,9 +685,10 @@ public class GroupApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #updateGroup(Object, String, String, String, * Visibility, Boolean, Boolean, Integer)} */ - public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Boolean membershipLock, + @Deprecated + public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, - Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { + Long parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("name", name) @@ -782,8 +784,8 @@ public class GroupApi extends AbstractApi { * @return a member viewable by the authenticated user * @throws GitLabApiException if any exception occurs */ - public Member getMember(Object groupIdOrPath, int userId) throws GitLabApiException { - return (getMember(groupIdOrPath, userId, false)); + public Member getMember(Object groupIdOrPath, long userId) throws GitLabApiException { + return (getMember(groupIdOrPath, userId, false)); } /** @@ -795,7 +797,7 @@ public class GroupApi extends AbstractApi { * @param userId the member ID of the member to get * @return a member viewable by the authenticated user as an Optional instance */ - public Optional getOptionalMember(Object groupIdOrPath, int userId) { + public Optional getOptionalMember(Object groupIdOrPath, long userId) { try { return (Optional.ofNullable(getMember(groupIdOrPath, userId, false))); } catch (GitLabApiException glae) { @@ -814,7 +816,7 @@ public class GroupApi extends AbstractApi { * @return the member specified by the project ID/user ID pair * @throws GitLabApiException if any exception occurs */ - public Member getMember(Object groupIdOrPath, Integer userId, Boolean includeInherited) throws GitLabApiException { + public Member getMember(Object groupIdOrPath, Long userId, Boolean includeInherited) throws GitLabApiException { Response response; if (includeInherited) { response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", "all", userId); @@ -834,7 +836,7 @@ public class GroupApi extends AbstractApi { * @param includeInherited if true will the member even if inherited thru an ancestor group * @return the member specified by the group ID/user ID pair as the value of an Optional */ - public Optional getOptionalMember(Object groupIdOrPath, Integer userId, Boolean includeInherited) { + public Optional getOptionalMember(Object groupIdOrPath, Long userId, Boolean includeInherited) { try { return (Optional.ofNullable(getMember(groupIdOrPath, userId, includeInherited))); } catch (GitLabApiException glae) { @@ -927,7 +929,7 @@ public class GroupApi extends AbstractApi { * @return the group members viewable by the authenticated user, including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public List getAllMembers(Object groupIdOrPath, String query, List userIds) throws GitLabApiException { + public List getAllMembers(Object groupIdOrPath, String query, List userIds) throws GitLabApiException { return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).all()); } @@ -946,7 +948,7 @@ public class GroupApi extends AbstractApi { * including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public Pager getAllMembers(Object groupIdOrPath, String query, List userIds, int itemsPerPage) throws GitLabApiException { + public Pager getAllMembers(Object groupIdOrPath, String query, List userIds, int itemsPerPage) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("query", query).withParam("user_ids", userIds); return (new Pager(this, Member.class, itemsPerPage, form.asMap(), "groups", getGroupIdOrPath(groupIdOrPath), "members", "all")); @@ -966,7 +968,7 @@ public class GroupApi extends AbstractApi { * including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public Stream getAllMembersStream(Object groupIdOrPath, String query, List userIds) throws GitLabApiException { + public Stream getAllMembersStream(Object groupIdOrPath, String query, List userIds) throws GitLabApiException { return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).stream()); } @@ -981,7 +983,7 @@ public class GroupApi extends AbstractApi { * @return a Member instance for the added user * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object groupIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { + public Member addMember(Object groupIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException { return (addMember(groupIdOrPath, userId, accessLevel, null)); } @@ -996,7 +998,7 @@ public class GroupApi extends AbstractApi { * @return a Member instance for the added user * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public Member addMember(Object groupIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { return (addMember(groupIdOrPath, userId, accessLevel.toValue(), null)); } @@ -1012,7 +1014,7 @@ public class GroupApi extends AbstractApi { * @return a Member instance for the added user * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { + public Member addMember(Object groupIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { return (addMember(groupIdOrPath, userId, accessLevel.toValue(), expiresAt)); } @@ -1028,7 +1030,7 @@ public class GroupApi extends AbstractApi { * @return a Member instance for the added user * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { + public Member addMember(Object groupIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("user_id", userId, true) @@ -1049,7 +1051,7 @@ public class GroupApi extends AbstractApi { * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { + public Member updateMember(Object groupIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException { return (updateMember(groupIdOrPath, userId, accessLevel, null)); } @@ -1064,7 +1066,7 @@ public class GroupApi extends AbstractApi { * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public Member updateMember(Object groupIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { return (updateMember(groupIdOrPath, userId, accessLevel.toValue(), null)); } @@ -1080,7 +1082,7 @@ public class GroupApi extends AbstractApi { * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { + public Member updateMember(Object groupIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { return (updateMember(groupIdOrPath, userId, accessLevel.toValue(), expiresAt)); } @@ -1096,7 +1098,7 @@ public class GroupApi extends AbstractApi { * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { + public Member updateMember(Object groupIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("access_level", accessLevel, true) .withParam("expires_at", expiresAt, false); @@ -1113,7 +1115,7 @@ public class GroupApi extends AbstractApi { * @param userId the user ID of the member to remove * @throws GitLabApiException if any exception occurs */ - public void removeMember(Object groupIdOrPath, Integer userId) throws GitLabApiException { + public void removeMember(Object groupIdOrPath, Long userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); } @@ -1398,7 +1400,7 @@ public class GroupApi extends AbstractApi { *
GitLab Endpoint: POST /groups/:id/projects/:project_id
* * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the transferred Project instance * @throws GitLabApiException if any exception occurs during execution */ @@ -1468,7 +1470,7 @@ public class GroupApi extends AbstractApi { * @return the group Audit event * @throws GitLabApiException if any exception occurs */ - public AuditEvent getAuditEvent(Object groupIdOrPath, Integer auditEventId) throws GitLabApiException { + public AuditEvent getAuditEvent(Object groupIdOrPath, Long auditEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "audit_events", auditEventId); return (response.readEntity(AuditEvent.class)); } @@ -1539,7 +1541,7 @@ public class GroupApi extends AbstractApi { * @return the approved AccessRequest instance * @throws GitLabApiException if any exception occurs */ - public AccessRequest approveAccessRequest(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public AccessRequest approveAccessRequest(Object groupIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("access_level", accessLevel); Response response = this.putWithFormData(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId, "approve"); @@ -1555,7 +1557,7 @@ public class GroupApi extends AbstractApi { * @param userId the user ID to deny access for * @throws GitLabApiException if any exception occurs */ - public void denyAccessRequest(Object groupIdOrPath, Integer userId) throws GitLabApiException { + public void denyAccessRequest(Object groupIdOrPath, Long userId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId); } @@ -1584,7 +1586,7 @@ public class GroupApi extends AbstractApi { * @return a Badge instance for the specified group/badge ID pair * @throws GitLabApiException if any exception occurs */ - public Badge getBadge(Object groupIdOrPath, Integer badgeId) throws GitLabApiException { + public Badge getBadge(Object groupIdOrPath, Long badgeId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "badges", badgeId); return (response.readEntity(Badge.class)); } @@ -1598,7 +1600,7 @@ public class GroupApi extends AbstractApi { * @param badgeId the ID of the badge to get * @return an Optional instance with the specified badge as the value */ - public Optional getOptionalBadge(Object groupIdOrPath, Integer badgeId) { + public Optional getOptionalBadge(Object groupIdOrPath, Long badgeId) { try { return (Optional.ofNullable(getBadge(groupIdOrPath, badgeId))); } catch (GitLabApiException glae) { @@ -1637,7 +1639,7 @@ public class GroupApi extends AbstractApi { * @return a Badge instance for the editted badge * @throws GitLabApiException if any exception occurs */ - public Badge editBadge(Object groupIdOrPath, Integer badgeId, String linkUrl, String imageUrl) throws GitLabApiException { + public Badge editBadge(Object groupIdOrPath, Long badgeId, String linkUrl, String imageUrl) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("link_url", linkUrl, false) .withParam("image_url", imageUrl, false); @@ -1654,7 +1656,7 @@ public class GroupApi extends AbstractApi { * @param badgeId the ID of the badge to remove * @throws GitLabApiException if any exception occurs */ - public void removeBadge(Object groupIdOrPath, Integer badgeId) throws GitLabApiException { + public void removeBadge(Object groupIdOrPath, Long badgeId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "badges", badgeId); } @@ -1705,7 +1707,7 @@ public class GroupApi extends AbstractApi { * @return a Group instance holding the details of the shared group * @throws GitLabApiException if any exception occurs */ - public Group shareGroup(Object groupIdOrPath, Integer shareWithGroupId, AccessLevel groupAccess, Date expiresAt) throws GitLabApiException { + public Group shareGroup(Object groupIdOrPath, Long shareWithGroupId, AccessLevel groupAccess, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("group_id", shareWithGroupId, true) .withParam("group_access", groupAccess, true) @@ -1723,7 +1725,7 @@ public class GroupApi extends AbstractApi { * @param sharedWithGroupId the ID of the group to unshare with, required * @throws GitLabApiException if any exception occurs */ - public void unshareGroup(Object groupIdOrPath, Integer sharedWithGroupId) throws GitLabApiException { + public void unshareGroup(Object groupIdOrPath, Long sharedWithGroupId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "share", sharedWithGroupId); } @@ -1733,7 +1735,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/custom_attributes
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a list of group's CustomAttributes * @throws GitLabApiException if any exception occurs */ @@ -1746,7 +1748,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/custom_attributes
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param itemsPerPage the number of items per page * @return a Pager of group's custom attributes * @throws GitLabApiException if any exception occurs @@ -1761,7 +1763,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/custom_attributes
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a Stream of group's custom attributes * @throws GitLabApiException if any exception occurs */ @@ -1774,7 +1776,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/custom_attributes/:key
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param key the key for the custom attribute * @return a CustomAttribute instance for the specified key * @throws GitLabApiException if any exception occurs @@ -1790,7 +1792,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/custom_attributes/:key
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance, required + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance, required * @param key the key for the custom attribute, required * @return an Optional instance with the value for a single custom attribute for the specified group */ @@ -1808,7 +1810,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: PUT /groups/:id/custom_attributes/:key
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param key the key for the custom attribute * @param value the value for the customAttribute * @return a CustomAttribute instance for the updated or created custom attribute @@ -1834,7 +1836,7 @@ public class GroupApi extends AbstractApi { * *
GitLab Endpoint: DELETE /groups/:id/custom_attributes/:key
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param key the key of the custom attribute to delete * @throws GitLabApiException if any exception occurs */ diff --git a/src/main/java/org/gitlab4j/api/ImportExportApi.java b/src/main/java/org/gitlab4j/api/ImportExportApi.java index 33a233dd..509eae1d 100644 --- a/src/main/java/org/gitlab4j/api/ImportExportApi.java +++ b/src/main/java/org/gitlab4j/api/ImportExportApi.java @@ -32,7 +32,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/export
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @throws GitLabApiException if any exception occurs */ public void scheduleExport(Object projectIdOrPath) throws GitLabApiException { @@ -44,7 +44,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/export
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param description overrides the project description, optional * @throws GitLabApiException if any exception occurs */ @@ -57,7 +57,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/export
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param description overrides the project description, optional * @param upload Mao that contains the information to upload the exported project to a web server * @param uploadUrl the URL to upload the project @@ -81,7 +81,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/export
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return an ExportStatus instance holding information on the export status * @throws GitLabApiException if any exception occurs */ @@ -95,7 +95,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/export/download
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir" * @return a File instance pointing to the download of the project export file * @throws GitLabApiException if any exception occurs @@ -109,7 +109,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/export/download
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param directory the File instance of the directory to save the export file to, if null will use "java.io.tmpdir" * @param filename Name to give to the downloaded file. If null then we try to get from Content-Disposition header * or to compute one from parameters @@ -251,7 +251,7 @@ public class ImportExportApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/import
* - * @param projectIdOrPath the new (imported) project identifier in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the new (imported) project identifier in the form of an Long(ID), String(path), or Project instance * @return an ImportStatus instance holding information on the import status * @throws GitLabApiException if any exception occurs */ diff --git a/src/main/java/org/gitlab4j/api/IssuesApi.java b/src/main/java/org/gitlab4j/api/IssuesApi.java index cb85f887..02c01fa8 100644 --- a/src/main/java/org/gitlab4j/api/IssuesApi.java +++ b/src/main/java/org/gitlab4j/api/IssuesApi.java @@ -90,7 +90,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's issues * @throws GitLabApiException if any exception occurs */ @@ -103,7 +103,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of issues per page * @return the list of issues in the specified range @@ -119,7 +119,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of issues per page * @return the Pager of issues in the specified range * @throws GitLabApiException if any exception occurs @@ -133,7 +133,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's issues * @throws GitLabApiException if any exception occurs */ @@ -146,7 +146,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings * @return the list of issues in the specified range. * @throws GitLabApiException if any exception occurs @@ -160,7 +160,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings. * @param page the page to get. * @param perPage the number of projects per page. @@ -178,7 +178,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings. * @param itemsPerPage the number of Project instances that will be fetched per page. * @return the Pager of issues in the specified range. @@ -194,7 +194,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings * @return a Stream of issues in the specified range. * @throws GitLabApiException if any exception occurs @@ -270,7 +270,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a List of issues for the specified group * @throws GitLabApiException if any exception occurs */ @@ -283,7 +283,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param itemsPerPage the number of Issue instances that will be fetched per page. * @return the Pager of issues for the specified group * @throws GitLabApiException if any exception occurs @@ -297,7 +297,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a Stream of issues for the specified group and filter * @throws GitLabApiException if any exception occurs */ @@ -310,7 +310,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings. * @return a List of issues for the specified group and filter * @throws GitLabApiException if any exception occurs @@ -324,7 +324,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings. * @param itemsPerPage the number of Issue instances that will be fetched per page. * @return the Pager of issues for the specified group and filter @@ -341,7 +341,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /groups/:id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param filter {@link IssueFilter} a IssueFilter instance with the filter settings. * @return a Stream of issues for the specified group and filter * @throws GitLabApiException if any exception occurs @@ -355,12 +355,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return the specified Issue instance * @throws GitLabApiException if any exception occurs */ - public Issue getIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Issue getIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid); return (response.readEntity(Issue.class)); @@ -371,11 +371,11 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return the specified Issue as an Optional instance */ - public Optional getOptionalIssue(Object projectIdOrPath, Integer issueIid) { + public Optional getOptionalIssue(Object projectIdOrPath, Long issueIid) { try { return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid))); } catch (GitLabApiException glae) { @@ -388,7 +388,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param title the title of an issue, required * @param description the description of an issue, optional * @return an instance of Issue @@ -403,7 +403,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param title the issue title of an issue, required * @param description the description of an issue, optional * @param confidential set the issue to be confidential, default is false, optional @@ -419,8 +419,8 @@ public class IssuesApi extends AbstractApi implements Constants { * @return an instance of Issue * @throws GitLabApiException if any exception occurs */ - public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List assigneeIds, Integer milestoneId, String labels, - Date createdAt, Date dueDate, Integer mergeRequestToResolveId, Integer discussionToResolveId) throws GitLabApiException { + public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List assigneeIds, Long milestoneId, String labels, + Date createdAt, Date dueDate, Long mergeRequestToResolveId, Long discussionToResolveId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) @@ -442,12 +442,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the issue IID to update, required * @return an instance of the updated Issue * @throws GitLabApiException if any exception occurs */ - public Issue closeIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Issue closeIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -463,7 +463,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the issue IID to update, required * @param title the title of an issue, optional * @param description the description of an issue, optional @@ -477,8 +477,8 @@ public class IssuesApi extends AbstractApi implements Constants { * @return an instance of the updated Issue * @throws GitLabApiException if any exception occurs */ - public Issue updateIssue(Object projectIdOrPath, Integer issueIid, String title, String description, Boolean confidential, List assigneeIds, - Integer milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException { + public Issue updateIssue(Object projectIdOrPath, Long issueIid, String title, String description, Boolean confidential, List assigneeIds, + Long milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -503,13 +503,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the issue IID to update, required * @param assigneeId the ID of the user to assign issue to, required * @return an instance of the updated Issue * @throws GitLabApiException if any exception occurs */ - public Issue assignIssue(Object projectIdOrPath, Integer issueIid, Integer assigneeId) throws GitLabApiException { + public Issue assignIssue(Object projectIdOrPath, Long issueIid, Long assigneeId) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -525,11 +525,11 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the internal ID of a project's issue * @throws GitLabApiException if any exception occurs */ - public void deleteIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public void deleteIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -544,13 +544,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the internal ID of a project's issue * @param duration estimated time in seconds * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats estimateTime(Object projectIdOrPath, Integer issueIid, int duration) throws GitLabApiException { + public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, int duration) throws GitLabApiException { return (estimateTime(projectIdOrPath, issueIid, new Duration(duration))); } @@ -559,13 +559,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the internal ID of a project's issue * @param duration Human readable format, e.g. 3h30m * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats estimateTime(Object projectIdOrPath, Integer issueIid, String duration) throws GitLabApiException { + public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, String duration) throws GitLabApiException { return (estimateTime(projectIdOrPath, issueIid, new Duration(duration))); } @@ -574,13 +574,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @param duration set the estimate of time to this duration * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats estimateTime(Object projectIdOrPath, Integer issueIid, Duration duration) throws GitLabApiException { + public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, Duration duration) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -599,12 +599,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_time_estimate
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats resetEstimatedTime(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public TimeStats resetEstimatedTime(Object projectIdOrPath, Long issueIid) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -620,13 +620,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @param duration the duration in seconds * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats addSpentTime(Object projectIdOrPath, Integer issueIid, int duration) throws GitLabApiException { + public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, int duration) throws GitLabApiException { return (addSpentTime(projectIdOrPath, issueIid, new Duration(duration))); } @@ -635,13 +635,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @param duration Human readable format, e.g. 3h30m * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats addSpentTime(Object projectIdOrPath, Integer issueIid, String duration) throws GitLabApiException { + public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, String duration) throws GitLabApiException { return (addSpentTime(projectIdOrPath, issueIid, new Duration(duration))); } @@ -650,13 +650,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @param duration the duration of time spent * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats addSpentTime(Object projectIdOrPath, Integer issueIid, Duration duration) throws GitLabApiException { + public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, Duration duration) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -675,12 +675,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_spent_time
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a TimeSTats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats resetSpentTime(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public TimeStats resetSpentTime(Object projectIdOrPath, Long issueIid) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -696,12 +696,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a TimeStats instance * @throws GitLabApiException if any exception occurs */ - public TimeStats getTimeTrackingStats(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public TimeStats getTimeTrackingStats(Object projectIdOrPath, Long issueIid) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issue IID cannot be null"); @@ -717,11 +717,11 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a TimeStats as an Optional instance */ - public Optional getOptionalTimeTrackingStats(Object projectIdOrPath, Integer issueIid) { + public Optional getOptionalTimeTrackingStats(Object projectIdOrPath, Long issueIid) { try { return (Optional.ofNullable(getTimeTrackingStats(projectIdOrPath, issueIid))); } catch (GitLabApiException glae) { @@ -739,7 +739,7 @@ public class IssuesApi extends AbstractApi implements Constants { * @return a List containing all the merge requests what will close the issue when merged. * @throws GitLabApiException if any exception occurs */ - public List getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getClosedByMergeRequests(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -755,7 +755,7 @@ public class IssuesApi extends AbstractApi implements Constants { * @return a List containing all the merge requests what will close the issue when merged. * @throws GitLabApiException if any exception occurs */ - public List getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { + public List getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by"); return (response.readEntity(new GenericType>() { })); @@ -772,7 +772,7 @@ public class IssuesApi extends AbstractApi implements Constants { * @return a Pager containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public Pager getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return new Pager(this, MergeRequest.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by"); } @@ -787,7 +787,7 @@ public class IssuesApi extends AbstractApi implements Constants { * @return a List containing all the merge requests what will close the issue when merged. * @throws GitLabApiException if any exception occurs */ - public Stream getClosedByMergeRequestsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getClosedByMergeRequestsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } @@ -799,12 +799,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a list of related issues of a given issue, sorted by the relationship creation datetime (ascending) * @throws GitLabApiException if any exception occurs */ - public List getIssueLinks(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueLinks(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -816,13 +816,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @param itemsPerPage the number of issues per page * @return a Pager of related issues of a given issue, sorted by the relationship creation datetime (ascending) * @throws GitLabApiException if any exception occurs */ - public Pager getIssueLinks(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getIssueLinks(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Issue.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links")); } @@ -835,12 +835,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue * @return a Stream of related issues of a given issue, sorted by the relationship creation datetime (ascending) * @throws GitLabApiException if any exception occurs */ - public Stream getIssueLinksStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getIssueLinksStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } @@ -851,15 +851,15 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue - * @param targetProjectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance of the target project + * @param targetProjectIdOrPath the project in the form of an Long(ID), String(path), or Project instance of the target project * @param targetIssueIid the internal ID of a target project’s issue * @return an instance of IssueLink holding the link relationship * @throws GitLabApiException if any exception occurs */ - public IssueLink createIssueLink(Object projectIdOrPath, Integer issueIid, - Object targetProjectIdOrPath, Integer targetIssueIid) throws GitLabApiException { + public IssueLink createIssueLink(Object projectIdOrPath, Long issueIid, + Object targetProjectIdOrPath, Long targetIssueIid) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("target_project_id", getProjectIdOrPath(targetProjectIdOrPath), true) @@ -877,13 +877,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links/:issue_link_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the internal ID of a project's issue, required * @param issueLinkId the ID of an issue relationship, required * @return an instance of IssueLink holding the deleted link relationship * @throws GitLabApiException if any exception occurs */ - public IssueLink deleteIssueLink(Object projectIdOrPath, Integer issueIid, Integer issueLinkId) throws GitLabApiException { + public IssueLink deleteIssueLink(Object projectIdOrPath, Long issueIid, Long issueLinkId) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links", issueLinkId); return (response.readEntity(IssueLink.class)); @@ -894,12 +894,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the IID of the issue to get the participants for * @return a List containing all participants for the specified issue * @throws GitLabApiException if any exception occurs */ - public List getParticipants(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getParticipants(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -908,14 +908,14 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the IID of the issue to get the participants for * @param page the page to get * @param perPage the number of projects per page * @return a List containing all participants for the specified issue * @throws GitLabApiException if any exception occurs */ - public List getParticipants(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { + public List getParticipants(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants"); return (response.readEntity(new GenericType>() { })); @@ -926,13 +926,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the IID of the issue to get the participants for * @param itemsPerPage the number of Participant instances that will be fetched per page * @return a Pager containing all participants for the specified issue * @throws GitLabApiException if any exception occurs */ - public Pager getParticipants(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getParticipants(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return new Pager(this, Participant.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants"); } @@ -942,12 +942,12 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the IID of the issue to get the participants for * @return a Stream containing all participants for the specified issue * @throws GitLabApiException if any exception occurs */ - public Stream getParticipantsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getParticipantsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } @@ -988,7 +988,7 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:projectId/issues_statistics
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param filter {@link IssuesStatisticsFilter} a IssuesStatisticsFilter instance with the filter settings. * @return an IssuesStatistics instance with the statistics for the matched issues * @throws GitLabApiException if any exception occurs @@ -1009,13 +1009,13 @@ public class IssuesApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:projectId/issues/:issue_iid/move
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueIid the IID of the issue to move * @param toProjectId the ID of the project to move the issue to * @return an Issue instance for the moved issue * @throws GitLabApiException if any exception occurs */ - public Issue moveIssue(Object projectIdOrPath, Integer issueIid, Object toProjectId) throws GitLabApiException { + public Issue moveIssue(Object projectIdOrPath, Long issueIid, Object toProjectId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("to_project_id", toProjectId, true); Response response = post(Response.Status.OK, formData, "projects", this.getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "move"); diff --git a/src/main/java/org/gitlab4j/api/JobApi.java b/src/main/java/org/gitlab4j/api/JobApi.java index de69ed22..7ae6fbc2 100644 --- a/src/main/java/org/gitlab4j/api/JobApi.java +++ b/src/main/java/org/gitlab4j/api/JobApi.java @@ -201,7 +201,7 @@ public class JobApi extends AbstractApi implements Constants { * @return a single job for the specified project ID * @throws GitLabApiException if any exception occurs during execution */ - public Job getJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job getJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId); return (response.readEntity(Job.class)); } @@ -215,7 +215,7 @@ public class JobApi extends AbstractApi implements Constants { * @param jobId the job ID to get * @return a single job for the specified project ID as an Optional intance */ - public Optional getOptionalJob(Object projectIdOrPath, Integer jobId) { + public Optional getOptionalJob(Object projectIdOrPath, Long jobId) { try { return (Optional.ofNullable(getJob(projectIdOrPath, jobId))); } catch (GitLabApiException glae) { @@ -293,7 +293,7 @@ public class JobApi extends AbstractApi implements Constants { * @return a File instance pointing to the download of the specified job artifacts file * @throws GitLabApiException if any exception occurs */ - public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException { + public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, File directory) throws GitLabApiException { Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); @@ -324,7 +324,7 @@ public class JobApi extends AbstractApi implements Constants { * @return an InputStream to read the specified job artifacts file * @throws GitLabApiException if any exception occurs */ - public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId) throws GitLabApiException { Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); return (response.readEntity(InputStream.class)); @@ -344,7 +344,7 @@ public class JobApi extends AbstractApi implements Constants { * @return a File instance pointing to the download of the specified artifacts file * @throws GitLabApiException if any exception occurs */ - public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException { + public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename()); @@ -378,7 +378,7 @@ public class JobApi extends AbstractApi implements Constants { * @return an InputStream to read the specified artifacts file from * @throws GitLabApiException if any exception occurs */ - public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile) throws GitLabApiException { + public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename()); return (response.readEntity(InputStream.class)); @@ -398,7 +398,7 @@ public class JobApi extends AbstractApi implements Constants { * @return a File instance pointing to the download of the specified artifacts file * @throws GitLabApiException if any exception occurs */ - public File downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath, File directory) throws GitLabApiException { + public File downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath, File directory) throws GitLabApiException { String path = artifactPath.toString().replace("\\", "/"); Response response = get(Response.Status.OK, getDefaultPerPageParam(), @@ -433,7 +433,7 @@ public class JobApi extends AbstractApi implements Constants { * @return an InputStream to read the specified artifacts file from * @throws GitLabApiException if any exception occurs */ - public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException { + public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath) throws GitLabApiException { String path = artifactPath.toString().replace("\\", "/"); Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", path); @@ -451,7 +451,7 @@ public class JobApi extends AbstractApi implements Constants { * @return a String containing the specified job's trace * @throws GitLabApiException if any exception occurs during execution */ - public String getTrace(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public String getTrace(Object projectIdOrPath, Long jobId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace"); return (response.readEntity(String.class)); @@ -469,7 +469,7 @@ public class JobApi extends AbstractApi implements Constants { * @deprecated replaced by {@link #cancelJob(Object, Integer)} */ @Deprecated - public Job cancleJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job cancleJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { return (cancelJob(projectIdOrPath, jobId)); } @@ -483,7 +483,7 @@ public class JobApi extends AbstractApi implements Constants { * @return job instance which just canceled * @throws GitLabApiException if any exception occurs during execution */ - public Job cancelJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job cancelJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel"); return (response.readEntity(Job.class)); @@ -499,7 +499,7 @@ public class JobApi extends AbstractApi implements Constants { * @return job instance which just retried * @throws GitLabApiException if any exception occurs during execution */ - public Job retryJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job retryJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "retry"); return (response.readEntity(Job.class)); @@ -515,7 +515,7 @@ public class JobApi extends AbstractApi implements Constants { * @return job instance which just erased * @throws GitLabApiException if any exception occurs during execution */ - public Job eraseJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job eraseJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "erase"); return (response.readEntity(Job.class)); @@ -531,7 +531,7 @@ public class JobApi extends AbstractApi implements Constants { * @return job instance which just played * @throws GitLabApiException if any exception occurs during execution */ - public Job playJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job playJob(Object projectIdOrPath, Long jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play"); return (response.readEntity(Job.class)); @@ -547,7 +547,7 @@ public class JobApi extends AbstractApi implements Constants { * @return the Job instance that was just modified * @throws GitLabApiException if any exception occurs during execution */ - public Job keepArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public Job keepArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "keep"); return (response.readEntity(Job.class)); @@ -562,7 +562,7 @@ public class JobApi extends AbstractApi implements Constants { * @param jobId the ID to delete artifacts for * @throws GitLabApiException if any exception occurs during execution */ - public void deleteArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException { + public void deleteArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException { delete(Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); } } diff --git a/src/main/java/org/gitlab4j/api/LabelsApi.java b/src/main/java/org/gitlab4j/api/LabelsApi.java index 125118f8..d9a4f045 100644 --- a/src/main/java/org/gitlab4j/api/LabelsApi.java +++ b/src/main/java/org/gitlab4j/api/LabelsApi.java @@ -24,7 +24,7 @@ public class LabelsApi extends AbstractApi { /** * Get all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's labels * @throws GitLabApiException if any exception occurs */ @@ -35,7 +35,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Pager of all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of items per page * @return a list of project's labels in the specified range * @throws GitLabApiException if any exception occurs @@ -48,7 +48,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Stream of all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's labels * @throws GitLabApiException if any exception occurs */ @@ -59,8 +59,8 @@ public class LabelsApi extends AbstractApi { /** * Get a single project label. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return a Label instance holding the information for the group label * @throws GitLabApiException if any exception occurs */ @@ -73,8 +73,8 @@ public class LabelsApi extends AbstractApi { /** * Get a single project label as the value of an Optional. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return a Optional instance with a Label instance as its value * @throws GitLabApiException if any exception occurs */ @@ -101,7 +101,7 @@ public class LabelsApi extends AbstractApi { * *
GitLab Endpoint: POST /groups/:id/labels
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param labelProperties a Label instance holding the properties for the new group label * @return the created Label instance * @throws GitLabApiException if any exception occurs @@ -126,8 +126,8 @@ public class LabelsApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/labels/:label_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @param labelConfig a Label instance holding the label properties to update * @return the updated Label instance * @throws GitLabApiException if any exception occurs @@ -142,8 +142,8 @@ public class LabelsApi extends AbstractApi { /** * Delete the specified project label. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @throws GitLabApiException if any exception occurs */ public void deleteProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException { @@ -153,8 +153,8 @@ public class LabelsApi extends AbstractApi { /** * Subscribe a specified project label. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs */ @@ -167,8 +167,8 @@ public class LabelsApi extends AbstractApi { /** * Unsubscribe a specified project label. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs */ @@ -181,7 +181,7 @@ public class LabelsApi extends AbstractApi { /** * Get all labels of the specified group. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a list of group's labels * @throws org.gitlab4j.api.GitLabApiException if any exception occurs */ @@ -192,7 +192,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Pager of all labels of the specified group. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param itemsPerPage the number of items per page * @return a list of group's labels in the specified range * @throws GitLabApiException if any exception occurs @@ -205,7 +205,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Stream of all labels of the specified group. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a Stream of group's labels * @throws GitLabApiException if any exception occurs */ @@ -216,8 +216,8 @@ public class LabelsApi extends AbstractApi { /** * Get a single group label. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return a Label instance holding the information for the group label * @throws GitLabApiException if any exception occurs */ @@ -230,8 +230,8 @@ public class LabelsApi extends AbstractApi { /** * Get a single group label as the value of an Optional. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return a Optional instance with a Label instance as its value * @throws GitLabApiException if any exception occurs */ @@ -256,7 +256,7 @@ public class LabelsApi extends AbstractApi { * *
GitLab Endpoint: POST /groups/:id/labels
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param labelProperties a Label instance holding the properties for the new group label * @return the created Label instance * @throws GitLabApiException if any exception occurs @@ -281,8 +281,8 @@ public class LabelsApi extends AbstractApi { * *
GitLab Endpoint: PUT /groups/:id/labels/:label_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @param labelConfig a Label instance holding the label properties to update * @return the updated Label instance * @throws GitLabApiException if any exception occurs @@ -297,8 +297,8 @@ public class LabelsApi extends AbstractApi { /** * Delete the specified label * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @throws GitLabApiException if any exception occurs */ public void deleteGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException { @@ -308,8 +308,8 @@ public class LabelsApi extends AbstractApi { /** * Subscribe a specified group label. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs */ @@ -322,8 +322,8 @@ public class LabelsApi extends AbstractApi { /** * Unsubscribe a specified group label. * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance - * @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance + * @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs */ @@ -337,7 +337,7 @@ public class LabelsApi extends AbstractApi { /** * Get all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's labels * @throws GitLabApiException if any exception occurs * @deprecated Replaced by the {@link #getProjectLabels(Object)} method. @@ -350,7 +350,7 @@ public class LabelsApi extends AbstractApi { /** * Get all labels of the specified project to using the specified page and per page setting * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of items per page * @return a list of project's labels in the specified range @@ -367,7 +367,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Pager of all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of items per page * @return a list of project's labels in the specified range * @throws GitLabApiException if any exception occurs @@ -382,7 +382,7 @@ public class LabelsApi extends AbstractApi { /** * Get a Stream of all labels of the specified project. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's labels * @throws GitLabApiException if any exception occurs * @deprecated Replaced by the {@link #getProjectLabelsStream(Object)} method. @@ -395,7 +395,7 @@ public class LabelsApi extends AbstractApi { /** * Create a label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param color the color for the label * @param description the description for the label @@ -411,7 +411,7 @@ public class LabelsApi extends AbstractApi { /** * Create a label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param color the color for the label * @return the created Label instance @@ -426,7 +426,7 @@ public class LabelsApi extends AbstractApi { /** * Create a label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param color the color for the label * @param priority the priority for the label @@ -442,7 +442,7 @@ public class LabelsApi extends AbstractApi { /** * Create a label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param color the color for the label * @param description the description for the label @@ -464,7 +464,7 @@ public class LabelsApi extends AbstractApi { /** * Update the specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param newName the new name for the label * @param description the description for the label @@ -481,7 +481,7 @@ public class LabelsApi extends AbstractApi { /** * Update the specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param color the color for the label * @param description the description for the label @@ -498,7 +498,7 @@ public class LabelsApi extends AbstractApi { /** * Update the specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @param newName the new name for the label * @param color the color for the label @@ -524,7 +524,7 @@ public class LabelsApi extends AbstractApi { /** * Delete the specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param name the name for the label * @throws GitLabApiException if any exception occurs * @deprecated Replaced by the {@link #deleteProjectLabel(Object, Object)} method. @@ -538,28 +538,28 @@ public class LabelsApi extends AbstractApi { /** * Subscribe a specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param labelId the label ID * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs * @deprecated Replaced by the {@link #subscribeProjectLabel(Object, Object)} method. */ @Deprecated - public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { + public Label subscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException { return (subscribeProjectLabel(projectIdOrPath, labelId)); } /** * Unsubscribe a specified label * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param labelId the label ID * @return HttpStatusCode 503 * @throws GitLabApiException if any exception occurs * @deprecated Replaced by the {@link #unsubscribeProjectLabel(Object, Object)} method. */ @Deprecated - public Label unsubscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { + public Label unsubscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException { return (unsubscribeProjectLabel(projectIdOrPath, labelId)); } } diff --git a/src/main/java/org/gitlab4j/api/LicenseApi.java b/src/main/java/org/gitlab4j/api/LicenseApi.java index 2664e78f..7b738a71 100644 --- a/src/main/java/org/gitlab4j/api/LicenseApi.java +++ b/src/main/java/org/gitlab4j/api/LicenseApi.java @@ -20,7 +20,7 @@ public class LicenseApi extends AbstractApi { /** * Retrieve information about the current license. - * + * *
GitLab Endpoint: GET /license
* * @return a License instance holding info about the current license @@ -108,7 +108,7 @@ public class LicenseApi extends AbstractApi { * @return a License instance for the delete license * @throws GitLabApiException if any exception occurs */ - public License deleteLicense(Integer licenseId) throws GitLabApiException { + public License deleteLicense(Long licenseId) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "license", licenseId); return (response.readEntity(License.class)); } diff --git a/src/main/java/org/gitlab4j/api/MergeRequestApi.java b/src/main/java/org/gitlab4j/api/MergeRequestApi.java index db237747..5b4df3ac 100644 --- a/src/main/java/org/gitlab4j/api/MergeRequestApi.java +++ b/src/main/java/org/gitlab4j/api/MergeRequestApi.java @@ -122,7 +122,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return all merge requests for the specified project * @throws GitLabApiException if any exception occurs */ @@ -135,7 +135,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of MergeRequest instances per page * @return all merge requests for the specified project @@ -151,7 +151,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of MergeRequest instances that will be fetched per page * @return all merge requests for the specified project * @throws GitLabApiException if any exception occurs @@ -165,7 +165,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream with all merge requests for the specified project * @throws GitLabApiException if any exception occurs */ @@ -178,7 +178,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests?state=:state
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all). * @return all merge requests for the specified project * @throws GitLabApiException if any exception occurs @@ -192,7 +192,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all). * @param page the page to get * @param perPage the number of MergeRequest instances per page @@ -213,7 +213,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all). * @param itemsPerPage the number of MergeRequest instances that will be fetched per page * @return all merge requests for the specified project @@ -230,7 +230,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests?state=:state
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all). * @return a Stream with all the merge requests for the specified project * @throws GitLabApiException if any exception occurs @@ -246,12 +246,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return the specified MergeRequest instance * @throws GitLabApiException if any exception occurs */ - public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest getMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return getMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null); } @@ -260,7 +260,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param renderHtml if true response includes rendered HTML for title and description, can be null * @param includeDivergedCommitCount if true response includes the commits behind the target branch, can be null @@ -268,7 +268,7 @@ public class MergeRequestApi extends AbstractApi { * @return a MergeRequest instance as specified by the parameters * @throws GitLabApiException if any exception occurs */ - public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, + public MergeRequest getMergeRequest(Object projectIdOrPath, Long mergeRequestIid, Boolean renderHtml, Boolean includeDivergedCommitCount, Boolean includeRebaseInProgress) throws GitLabApiException { GitLabApiForm queryParams = new GitLabApiForm() @@ -288,11 +288,11 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return the specified MergeRequest as an Optional instance instance */ - public Optional getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) { + public Optional getOptionalMergeRequest(Object projectIdOrPath, Long mergeRequestIid) { return getOptionalMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null); } @@ -303,14 +303,14 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param renderHtml if true response includes rendered HTML for title and description, can be null * @param includeDivergedCommitCount if true response includes the commits behind the target branch, can be null * @param includeRebaseInProgress if true response includes whether a rebase operation is in progress, can be null * @return the specified MergeRequest as an Optional instance instance */ - public Optional getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, + public Optional getOptionalMergeRequest(Object projectIdOrPath, Long mergeRequestIid, Boolean renderHtml, Boolean includeDivergedCommitCount , Boolean includeRebaseInProgress) { try { return (Optional.ofNullable(getMergeRequest(projectIdOrPath, mergeRequestIid, renderHtml, includeDivergedCommitCount, includeRebaseInProgress))); @@ -326,7 +326,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a list containing the commits for the specified merge request * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -342,7 +342,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param page the page to get * @param perPage the number of commits per page @@ -362,7 +362,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param itemsPerPage the number of Commit instances that will be fetched per page * @return a Pager containing the commits for the specified merge request @@ -380,7 +380,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Stream containing the commits for the specified merge request * @throws GitLabApiException GitLabApiException if any exception occurs during execution @@ -394,12 +394,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a List of merge request diff versions for the specified merge request * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestDiffs(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestDiffs(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestDiffs(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -408,13 +408,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param itemsPerPage the number of MergeRequest instances that will be fetched per page * @return a Pager of merge request diff versions for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Pager getMergeRequestDiffs(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequestDiffs(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, MergeRequestDiff.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "versions")); } @@ -424,12 +424,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Stream of merge request diff versions for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Stream getMergeRequestDiffsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getMergeRequestDiffsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestDiffs(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } @@ -438,14 +438,14 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param versionId the ID of the merge request diff version * @return a MergeRequestDiff instance for the specified MR diff version * @throws GitLabApiException if any exception occurs */ public MergeRequestDiff getMergeRequestDiff(Object projectIdOrPath, - Integer mergeRequestIid, Integer versionId) throws GitLabApiException { + Long mergeRequestIid, Long versionId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "versions", versionId); return (response.readEntity(MergeRequestDiff.class)); @@ -456,13 +456,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param versionId the ID of the merge request diff version * @return the specified MergeRequestDiff as an Optional instance instance */ public Optional getOptionalMergeRequestDiff( - Object projectIdOrPath, Integer mergeRequestIid, Integer versionId) { + Object projectIdOrPath, Long mergeRequestIid, Long versionId) { try { return (Optional.ofNullable(getMergeRequestDiff(projectIdOrPath, mergeRequestIid, versionId))); } catch (GitLabApiException glae) { @@ -475,7 +475,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param params a MergeRequestParams instance holding the info to create the merge request * @return the created MergeRequest instance * @throws GitLabApiException if any exception occurs @@ -492,7 +492,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sourceBranch the source branch, required * @param targetBranch the target branch, required * @param title the title for the merge request, required @@ -507,8 +507,8 @@ public class MergeRequestApi extends AbstractApi { * @throws GitLabApiException if any exception occurs * @since GitLab Starter 8.17, GitLab CE 11.0. */ - public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId, - Integer targetProjectId, String[] labels, Integer milestoneId, Boolean removeSourceBranch, Boolean squash) throws GitLabApiException { + public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId, + Long targetProjectId, String[] labels, Long milestoneId, Boolean removeSourceBranch, Boolean squash) throws GitLabApiException { MergeRequestParams params = new MergeRequestParams() .withSourceBranch(sourceBranch) @@ -530,7 +530,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sourceBranch the source branch, required * @param targetBranch the target branch, required * @param title the title for the merge request, required @@ -543,8 +543,8 @@ public class MergeRequestApi extends AbstractApi { * @return the created MergeRequest instance * @throws GitLabApiException if any exception occurs */ - public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId, - Integer targetProjectId, String[] labels, Integer milestoneId, Boolean removeSourceBranch) throws GitLabApiException { + public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId, + Long targetProjectId, String[] labels, Long milestoneId, Boolean removeSourceBranch) throws GitLabApiException { MergeRequestParams params = new MergeRequestParams() .withSourceBranch(sourceBranch) @@ -565,7 +565,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sourceBranch the source branch, required * @param targetBranch the target branch, required * @param title the title for the merge request, required @@ -574,7 +574,7 @@ public class MergeRequestApi extends AbstractApi { * @return the created MergeRequest instance * @throws GitLabApiException if any exception occurs */ - public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId) + public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId) throws GitLabApiException { MergeRequestParams params = new MergeRequestParams() @@ -592,13 +592,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request to update * @param params a MergeRequestParams instance holding the info to update the merge request * @return the updated merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest updateMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, MergeRequestParams params) throws GitLabApiException { + public MergeRequest updateMergeRequest(Object projectIdOrPath, Long mergeRequestIid, MergeRequestParams params) throws GitLabApiException { GitLabApiForm form = params.getForm(false); Response response = put(Response.Status.OK, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid); @@ -612,7 +612,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request to update * @param targetBranch the target branch, optional * @param title the title for the merge request @@ -630,9 +630,9 @@ public class MergeRequestApi extends AbstractApi { * @return the updated merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest updateMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, - String targetBranch, String title, Integer assigneeId, String description, - StateEvent stateEvent, String labels, Integer milestoneId, Boolean removeSourceBranch, + public MergeRequest updateMergeRequest(Object projectIdOrPath, Long mergeRequestIid, + String targetBranch, String title, Long assigneeId, String description, + StateEvent stateEvent, String labels, Long milestoneId, Boolean removeSourceBranch, Boolean squash, Boolean discussionLocked, Boolean allowCollaboration) throws GitLabApiException { @@ -664,11 +664,11 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @throws GitLabApiException if any exception occurs */ - public void deleteMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public void deleteMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -690,13 +690,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param params the MergeRequest instance holding the parameters for accepting the merge request * @return the merged merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, + public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid, AcceptMergeRequestParams params) throws GitLabApiException { Response response = put(Response.Status.OK, params.getForm().asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "merge"); @@ -715,12 +715,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return the merged merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null, null)); } @@ -737,7 +737,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param mergeCommitMessage, custom merge commit message, optional * @param shouldRemoveSourceBranch, if true removes the source branch, optional @@ -745,7 +745,7 @@ public class MergeRequestApi extends AbstractApi { * @return the merged merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, + public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid, String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds) throws GitLabApiException { return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, mergeCommitMessage, @@ -765,7 +765,7 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param mergeCommitMessage, custom merge commit message, optional * @param shouldRemoveSourceBranch, if true removes the source branch, optional @@ -774,7 +774,7 @@ public class MergeRequestApi extends AbstractApi { * @return the merged merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, + public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid, String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds, String sha) throws GitLabApiException { @@ -804,12 +804,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return the updated merge request * @throws GitLabApiException if any exception occurs */ - public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest cancelMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -826,12 +826,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approvals
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a MergeRequest instance with approval information included * @throws GitLabApiException if any exception occurs */ - public MergeRequest getMergeRequestApprovals(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest getMergeRequestApprovals(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getApprovals(projectIdOrPath, mergeRequestIid)); } @@ -842,12 +842,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approvals
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a MergeRequest instance with approval information included * @throws GitLabApiException if any exception occurs */ - public MergeRequest getApprovals(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest getApprovals(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -863,12 +863,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_state
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a ApprovalState instance with approval state * @throws GitLabApiException if any exception occurs */ - public ApprovalState getApprovalState(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public ApprovalState getApprovalState(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -885,12 +885,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a List of ApprovalRule instances for the specified merge request. * @throws GitLabApiException if any exception occurs */ - public List getApprovalRules(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getApprovalRules(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getApprovalRules(projectIdOrPath, mergeRequestIid, -1).all()); } @@ -900,13 +900,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param itemsPerPage the number of ApprovalRule instances that will be fetched per page * @return a Pager of ApprovalRule instances for the specified merge request. * @throws GitLabApiException if any exception occurs */ - public Pager getApprovalRules(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getApprovalRules(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -922,12 +922,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Stream of ApprovalRule instances for the specified merge request. * @throws GitLabApiException if any exception occurs */ - public Stream getApprovalRulesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getApprovalRulesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getApprovalRules(projectIdOrPath, mergeRequestIid, -1).stream()); } @@ -937,15 +937,15 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param projectRuleId the ID of a project-level approval rule * @param params the ApprovalRuleParams instance holding the parameters for the approval rule * @return a ApprovalRule instance with approval configuration * @throws GitLabApiException if any exception occurs */ - public ApprovalRule createApprovalRule(Object projectIdOrPath, Integer mergeRequestIid, - Integer projectRuleId, ApprovalRuleParams params) throws GitLabApiException { + public ApprovalRule createApprovalRule(Object projectIdOrPath, Long mergeRequestIid, + Long projectRuleId, ApprovalRuleParams params) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -964,15 +964,15 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param approvalRuleId the ID of the approval rule * @param params the ApprovalRuleParams instance holding the parameters for the approval rule update * @return a ApprovalRule instance with approval configuration * @throws GitLabApiException if any exception occurs */ - public ApprovalRule updateApprovalRule(Object projectIdOrPath, Integer mergeRequestIid, - Integer approvalRuleId, ApprovalRuleParams params) throws GitLabApiException { + public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long mergeRequestIid, + Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -994,12 +994,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param approvalRuleId the ID of the approval rule * @throws GitLabApiException if any exception occurs */ - public void deleteApprovalRule(Object projectIdOrPath, Integer mergeRequestIid, Integer approvalRuleId) throws GitLabApiException { + public void deleteApprovalRule(Object projectIdOrPath, Long mergeRequestIid, Long approvalRuleId) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -1020,13 +1020,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/approve
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param sha the HEAD of the merge request, optional * @return a MergeRequest instance with approval information included * @throws GitLabApiException if any exception occurs */ - public MergeRequest approveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, String sha) throws GitLabApiException { + public MergeRequest approveMergeRequest(Object projectIdOrPath, Long mergeRequestIid, String sha) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -1044,12 +1044,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/unapprove
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a MergeRequest instance with approval information included * @throws GitLabApiException if any exception occurs */ - public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); @@ -1064,12 +1064,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/changes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the IID of the merge request to get * @return a merge request including its changes * @throws GitLabApiException if any exception occurs */ - public MergeRequest getMergeRequestChanges(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest getMergeRequestChanges(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "changes"); return (response.readEntity(MergeRequest.class)); } @@ -1079,12 +1079,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the IID of the merge request to get * @return a List containing all participants for the specified merge request * @throws GitLabApiException if any exception occurs */ - public List getParticipants(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getParticipants(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -1093,14 +1093,14 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the IID of the merge request to get * @param page the page to get * @param perPage the number of projects per page * @return a List containing all participants for the specified merge request * @throws GitLabApiException if any exception occurs */ - public List getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException { + public List getParticipants(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants"); return (response.readEntity(new GenericType>() { })); @@ -1111,13 +1111,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the IID of the merge request to get * @param itemsPerPage the number of Participant instances that will be fetched per page * @return a Pager containing all participants for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Pager getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getParticipants(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return new Pager(this, Participant.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants"); } @@ -1127,12 +1127,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the IID of the merge request to get * @return a Stream containing all participants for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Stream getParticipantsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getParticipantsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } @@ -1146,7 +1146,7 @@ public class MergeRequestApi extends AbstractApi { * @return a List containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public List getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getClosesIssues(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -1162,7 +1162,7 @@ public class MergeRequestApi extends AbstractApi { * @return a List containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public List getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException { + public List getClosesIssues(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues"); return (response.readEntity(new GenericType>() { })); @@ -1179,8 +1179,8 @@ public class MergeRequestApi extends AbstractApi { * @return a Pager containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public Pager getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { - return new Pager(this, Issue.class, itemsPerPage, null, + public Pager getClosesIssues(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { + return new Pager(this, Issue.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues"); } @@ -1194,7 +1194,7 @@ public class MergeRequestApi extends AbstractApi { * @return a Stream containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public Stream getClosesIssuesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getClosesIssuesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } @@ -1208,7 +1208,7 @@ public class MergeRequestApi extends AbstractApi { * @return a List containing all the issues that would be closed by merging the provided merge request * @throws GitLabApiException if any exception occurs */ - public List getApprovalStatus(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getApprovalStatus(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -1220,12 +1220,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/rebase
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request to rebase * @return the merge request info containing the status of a merge request rebase * @throws GitLabApiException if any exception occurs */ - public MergeRequest rebaseMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest rebaseMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Response response = put(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "rebase"); return (response.readEntity(MergeRequest.class)); @@ -1236,12 +1236,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request being rebased * @return the merge request info containing the status of a merge request rebase * @throws GitLabApiException if any exception occurs */ - public MergeRequest getRebaseStatus(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public MergeRequest getRebaseStatus(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return getMergeRequest(projectIdOrPath, mergeRequestIid, null, null, true); } @@ -1250,12 +1250,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a list containing the pipelines for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public List getMergeRequestPipelines(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestPipelines(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestPipelines(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -1264,13 +1264,13 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @param itemsPerPage the number of Pipeline instances that will be fetched per page * @return a Pager containing the pipelines for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public Pager getMergeRequestPipelines(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequestPipelines(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Pipeline.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "pipelines")); } @@ -1280,12 +1280,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Stream containing the pipelines for the specified merge request * @throws GitLabApiException if any exception occurs during execution */ - public Stream getMergeRequestPipelinesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getMergeRequestPipelinesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestPipelines(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } @@ -1300,12 +1300,12 @@ public class MergeRequestApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the internal ID of the merge request * @return a Pipeline instance with the newly created pipeline info * @throws GitLabApiException if any exception occurs during execution */ - public Pipeline createMergeRequestPipeline(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Pipeline createMergeRequestPipeline(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { Response response = post(Response.Status.CREATED, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "pipelines"); return (response.readEntity(Pipeline.class)); diff --git a/src/main/java/org/gitlab4j/api/MilestonesApi.java b/src/main/java/org/gitlab4j/api/MilestonesApi.java index 4d0a71c4..8204f204 100644 --- a/src/main/java/org/gitlab4j/api/MilestonesApi.java +++ b/src/main/java/org/gitlab4j/api/MilestonesApi.java @@ -28,7 +28,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return the milestones associated with the specified group * @throws GitLabApiException if any exception occurs */ @@ -41,7 +41,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param page the page number to get * @param perPage how many milestones per page * @return the milestones associated with the specified group @@ -58,7 +58,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param itemsPerPage The number of Milestone instances that will be fetched per page * @return the milestones associated with the specified group * @throws GitLabApiException if any exception occurs @@ -73,7 +73,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @return a Stream of the milestones associated with the specified group * @throws GitLabApiException if any exception occurs */ @@ -86,7 +86,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param state the milestone state * @return the milestones associated with the specified group and state * @throws GitLabApiException if any exception occurs @@ -103,7 +103,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param search the search string * @return the milestones associated with the specified group * @throws GitLabApiException if any exception occurs @@ -120,7 +120,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param state the milestone state * @param search the search string * @return the milestones associated with the specified group @@ -141,12 +141,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the ID of the milestone tp get * @return a Milestone instance for the specified IDs * @throws GitLabApiException if any exception occurs */ - public Milestone getGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone getGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId); return (response.readEntity(Milestone.class)); @@ -157,12 +157,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to get the issues for * @return a List of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public List getGroupIssues(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public List getGroupIssues(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { return (getGroupIssues(groupIdOrPath, milestoneId, getDefaultPerPage()).all()); } @@ -171,13 +171,13 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to get the issues for * @param itemsPerPage The number of Milestone instances that will be fetched per page * @return a Pager of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public Pager getGroupIssues(Object groupIdOrPath, Integer milestoneId, int itemsPerPage) throws GitLabApiException { + public Pager getGroupIssues(Object groupIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Issue.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "issues")); } @@ -187,12 +187,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to get the issues for * @return a Stream of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public Stream getGroupIssuesStream(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public Stream getGroupIssuesStream(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { return (getGroupIssues(groupIdOrPath, milestoneId, getDefaultPerPage()).stream()); } @@ -201,12 +201,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/merge_requests
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to get the merge requests for * @return a list of merge requests associated with the specified milestone * @throws GitLabApiException if any exception occurs */ - public List getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public List getGroupMergeRequest(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "merge_requests"); return (response.readEntity(new GenericType>() {})); @@ -217,7 +217,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: POST /groups/:id/milestones
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param title the title for the milestone * @param description the description for the milestone * @param dueDate the due date for the milestone @@ -240,12 +240,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to close * @return the closed Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone closeGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); @@ -262,12 +262,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to activate * @return the activated Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone activateGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone activateGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); @@ -284,7 +284,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
* - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance + * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance * @param milestoneId the milestone ID to update * @param title the updated title for the milestone * @param description the updated description for the milestone @@ -294,7 +294,7 @@ public class MilestonesApi extends AbstractApi { * @return the updated Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone updateGroupMilestone(Object groupIdOrPath, Integer milestoneId, String title, String description, + public Milestone updateGroupMilestone(Object groupIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException { if (milestoneId == null) { @@ -317,7 +317,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the milestones associated with the specified project * @throws GitLabApiException if any exception occurs */ @@ -330,7 +330,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page number to get * @param perPage how many milestones per page * @return the milestones associated with the specified project @@ -347,7 +347,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage The number of Milestone instances that will be fetched per page * @return the milestones associated with the specified project * @throws GitLabApiException if any exception occurs @@ -362,7 +362,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of the milestones associated with the specified project * @throws GitLabApiException if any exception occurs */ @@ -375,7 +375,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the milestone state * @return the milestones associated with the specified project and state * @throws GitLabApiException if any exception occurs @@ -392,7 +392,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param search the search string * @return the milestones associated with the specified project * @throws GitLabApiException if any exception occurs @@ -409,7 +409,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param state the milestone state * @param search the search string * @return the milestones associated with the specified project @@ -430,12 +430,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones/:milestone_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the ID of the milestone tp get * @return a Milestone instance for the specified IDs * @throws GitLabApiException if any exception occurs */ - public Milestone getMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone getMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId); return (response.readEntity(Milestone.class)); @@ -446,12 +446,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to get the issues for * @return a List of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public List getIssues(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public List getIssues(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { return (getIssues(projectIdOrPath, milestoneId, getDefaultPerPage()).all()); } @@ -460,13 +460,13 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to get the issues for * @param itemsPerPage the number of Milestone instances that will be fetched per page * @return a Pager of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public Pager getIssues(Object projectIdOrPath, Integer milestoneId, int itemsPerPage) throws GitLabApiException { + public Pager getIssues(Object projectIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Issue.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "issues")); } @@ -476,12 +476,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to get the issues for * @return a Stream of Issue for the milestone * @throws GitLabApiException if any exception occurs */ - public Stream getIssuesStream(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public Stream getIssuesStream(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { return (getIssues(projectIdOrPath, milestoneId, getDefaultPerPage()).stream()); } @@ -489,13 +489,13 @@ public class MilestonesApi extends AbstractApi { * Get the list of merge requests associated with the specified milestone. * *
GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/merge_requests
- * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to get the merge requests for * @return a list of merge requests associated with the specified milestone * @throws GitLabApiException if any exception occurs */ - public List getMergeRequest(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public List getMergeRequest(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "merge_requests"); return (response.readEntity(new GenericType>() {})); @@ -506,7 +506,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/milestones
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param title the title for the milestone * @param description the description for the milestone * @param dueDate the due date for the milestone @@ -530,12 +530,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to close * @return the closed Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone closeMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone closeMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); @@ -552,12 +552,12 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to activate * @return the activated Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public Milestone activateMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); @@ -574,7 +574,7 @@ public class MilestonesApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to update * @param title the updated title for the milestone * @param description the updated description for the milestone @@ -584,13 +584,13 @@ public class MilestonesApi extends AbstractApi { * @return the updated Milestone instance * @throws GitLabApiException if any exception occurs */ - public Milestone updateMilestone(Object projectIdOrPath, Integer milestoneId, String title, String description, + public Milestone updateMilestone(Object projectIdOrPath, Long milestoneId, String title, String description, Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); } - + GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("description", description) @@ -605,11 +605,11 @@ public class MilestonesApi extends AbstractApi { /** * Delete a project milestone. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param milestoneId the milestone ID to delete * @throws GitLabApiException if any exception occurs */ - public void deleteMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { + public void deleteMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId); } } diff --git a/src/main/java/org/gitlab4j/api/NotesApi.java b/src/main/java/org/gitlab4j/api/NotesApi.java index cf7120b1..ebd901b6 100644 --- a/src/main/java/org/gitlab4j/api/NotesApi.java +++ b/src/main/java/org/gitlab4j/api/NotesApi.java @@ -20,14 +20,14 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue ID to get the notes for * @return a list of the issues's notes * @throws GitLabApiException if any exception occurs * @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer)} */ @Deprecated - public List getNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getNotes(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueNotes(projectIdOrPath, issueIid)); } @@ -36,7 +36,7 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to get the notes for * @param page the page to get * @param perPage the number of notes per page @@ -45,7 +45,7 @@ public class NotesApi extends AbstractApi { * @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer, int, int)} */ @Deprecated - public List getNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { + public List getNotes(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException { return (getIssueNotes(projectIdOrPath, issueIid, page, perPage)); } @@ -54,7 +54,7 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to get the notes for * @param itemsPerPage the number of notes per page * @return the list of notes in the specified range @@ -62,7 +62,7 @@ public class NotesApi extends AbstractApi { * @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer, int)} */ @Deprecated - public Pager getNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getNotes(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (getIssueNotes(projectIdOrPath, issueIid, itemsPerPage)); } @@ -71,12 +71,12 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue ID to get the notes for * @return a list of the issues's notes * @throws GitLabApiException if any exception occurs */ - public List getIssueNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueNotes(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueNotes(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -85,14 +85,14 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to get the notes for * @param page the page to get * @param perPage the number of notes per page * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public List getIssueNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { + public List getIssueNotes(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes"); return (response.readEntity(new GenericType>() {})); @@ -103,13 +103,13 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to get the notes for * @param itemsPerPage the number of notes per page * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public Pager getIssueNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getIssueNotes(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, Note.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes")); } @@ -119,25 +119,25 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue ID to get the notes for * @return a Stream of the issues's notes * @throws GitLabApiException if any exception occurs */ - public Stream getIssueNotesStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getIssueNotesStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueNotes(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } /** * Get the specified issues's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to get the notes for * @param noteId the ID of the Note to get * @return a Note instance for the specified IDs * @throws GitLabApiException if any exception occurs */ - public Note getIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { + public Note getIssueNote(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId); return (response.readEntity(Note.class)); @@ -145,27 +145,27 @@ public class NotesApi extends AbstractApi { /** * Create a issues's note. - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for * @param issueIid the issue IID to create the notes for * @param body the content of note * @return the created Note instance * @throws GitLabApiException if any exception occurs */ - public Note createIssueNote(Object projectIdOrPath, Integer issueIid, String body) throws GitLabApiException { + public Note createIssueNote(Object projectIdOrPath, Long issueIid, String body) throws GitLabApiException { return (createIssueNote(projectIdOrPath, issueIid, body, null)); } /** * Create a issues's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to create the notes for * @param body the content of note * @param createdAt the created time of note * @return the created Note instance * @throws GitLabApiException if any exception occurs */ - public Note createIssueNote(Object projectIdOrPath, Integer issueIid, String body, Date createdAt) throws GitLabApiException { + public Note createIssueNote(Object projectIdOrPath, Long issueIid, String body, Date createdAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("body", body, true) @@ -178,14 +178,14 @@ public class NotesApi extends AbstractApi { /** * Update the specified issues's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to update the notes for * @param noteId the ID of the node to update * @param body the update content for the Note * @return the modified Note instance * @throws GitLabApiException if any exception occurs */ - public Note updateIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId, String body) throws GitLabApiException { + public Note updateIssueNote(Object projectIdOrPath, Long issueIid, Long noteId, String body) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true); Response response = put(Response.Status.OK, formData.asMap(), @@ -196,12 +196,12 @@ public class NotesApi extends AbstractApi { /** * Delete the specified issues's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param issueIid the issue IID to delete the notes for * @param noteId the ID of the node to delete * @throws GitLabApiException if any exception occurs */ - public void deleteIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { + public void deleteIssueNote(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException { if (issueIid == null) { throw new RuntimeException("issueIid cannot be null"); @@ -221,12 +221,12 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the issue ID to get the notes for * @return a list of the merge request's notes * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, getDefaultPerPage()).all()); } @@ -235,14 +235,14 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the issue ID to get the notes for * @param sortOrder return merge request notes sorted in the specified sort order, default is DESC * @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT * @return a list of the merge request's notes * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException { + public List getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, sortOrder, orderBy, getDefaultPerPage()).all()); } @@ -251,14 +251,14 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to get the notes for * @param page the page to get * @param perPage the number of notes per page * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException { + public List getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, page, perPage)); } @@ -267,7 +267,7 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to get the notes for * @param sortOrder return merge request notes sorted in the specified sort order, default is DESC * @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT @@ -276,7 +276,7 @@ public class NotesApi extends AbstractApi { * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, + public List getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -294,13 +294,13 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to get the notes for * @param itemsPerPage the number of notes per page * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public Pager getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, itemsPerPage)); } @@ -309,12 +309,12 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the issue ID to get the notes for * @return a Stream of the merge request's notes * @throws GitLabApiException if any exception occurs */ - public Stream getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getMergeRequestNotesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, getDefaultPerPage()).stream()); } @@ -323,7 +323,7 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to get the notes for * @param sortOrder return merge request notes sorted in the specified sort order, default is DESC * @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT @@ -331,7 +331,7 @@ public class NotesApi extends AbstractApi { * @return the list of notes in the specified range * @throws GitLabApiException if any exception occurs */ - public Pager getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, + public Pager getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -348,27 +348,27 @@ public class NotesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the issue ID to get the notes for * @param sortOrder return merge request notes sorted in the specified sort order, default is DESC * @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT * @return a Stream of the merge request's notes * @throws GitLabApiException if any exception occurs */ - public Stream getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException { + public Stream getMergeRequestNotesStream(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException { return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, sortOrder, orderBy, getDefaultPerPage()).stream()); } /** * Get the specified merge request's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to get the notes for * @param noteId the ID of the Note to get * @return a Note instance for the specified IDs * @throws GitLabApiException if any exception occurs */ - public Note getMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException { + public Note getMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId); return (response.readEntity(Note.class)); @@ -377,13 +377,13 @@ public class NotesApi extends AbstractApi { /** * Create a merge request's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to create the notes for * @param body the content of note * @return the created Note instance * @throws GitLabApiException if any exception occurs */ - public Note createMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, String body) throws GitLabApiException { + public Note createMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, String body) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes"); @@ -393,14 +393,14 @@ public class NotesApi extends AbstractApi { /** * Update the specified merge request's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to update the notes for * @param noteId the ID of the node to update * @param body the update content for the Note * @return the modified Note instance * @throws GitLabApiException if any exception occurs */ - public Note updateMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, String body) throws GitLabApiException { + public Note updateMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId, String body) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true); Response response = put(Response.Status.OK, formData.asMap(), @@ -411,12 +411,12 @@ public class NotesApi extends AbstractApi { /** * Delete the specified merge request's note. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mergeRequestIid the merge request IID to delete the notes for * @param noteId the ID of the node to delete * @throws GitLabApiException if any exception occurs */ - public void deleteMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException { + public void deleteMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); diff --git a/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java b/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java index bab423d7..99935647 100644 --- a/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java +++ b/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java @@ -13,7 +13,7 @@ public class NotificationSettingsApi extends AbstractApi { /** * Get the global notification settings. - * + * *
GitLab Endpoint: GET /notification_settings
* * @return a NotificationSettings instance containing the global notification settings @@ -26,7 +26,7 @@ public class NotificationSettingsApi extends AbstractApi { /** * Update the global notification settings. - * + * *
GitLab Endpoint: PUT /notification_settings
* * @param settings a NotificationSettings instance with the new settings @@ -37,7 +37,7 @@ public class NotificationSettingsApi extends AbstractApi { GitLabApiForm formData = new GitLabApiForm() .withParam("level", settings.getLevel()) - .withParam("email", settings.getEmail()); + .withParam("email", settings.getEmail()); Events events = settings.getEvents(); if (events != null) { @@ -61,21 +61,21 @@ public class NotificationSettingsApi extends AbstractApi { /** * Get the notification settings for a group. - * + * *
GitLab Endpoint: GET /groups/:id/notification_settings
* * @param groupId the group ID to get the notification settings for * @return a NotificationSettings instance containing the specified group's notification settings * @throws GitLabApiException if any exception occurs */ - public NotificationSettings getGroupNotificationSettings(int groupId) throws GitLabApiException { + public NotificationSettings getGroupNotificationSettings(long groupId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); } /** * Update the notification settings for a group - * + * *
GitLab Endpoint: PUT /groups/:id/notification_settings
* * @param groupId the group ID to update the notification settings for @@ -83,11 +83,11 @@ public class NotificationSettingsApi extends AbstractApi { * @return a NotificationSettings instance containing the updated group notification settings * @throws GitLabApiException if any exception occurs */ - public NotificationSettings updateGroupNotificationSettings(int groupId, NotificationSettings settings) throws GitLabApiException { + public NotificationSettings updateGroupNotificationSettings(long groupId, NotificationSettings settings) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("level", settings.getLevel()) - .withParam("email", settings.getEmail()); + .withParam("email", settings.getEmail()); Events events = settings.getEvents(); if (events != null) { @@ -111,21 +111,21 @@ public class NotificationSettingsApi extends AbstractApi { /** * Get the notification settings for a project. - * + * *
GitLab Endpoint: GET /projects/:id/notification_settings
* * @param projectId the project ID to get the notification settings for * @return a NotificationSettings instance containing the specified project's notification settings * @throws GitLabApiException if any exception occurs */ - public NotificationSettings getProjectNotificationSettings(int projectId) throws GitLabApiException { + public NotificationSettings getProjectNotificationSettings(long projectId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); } /** * Update the notification settings for a project - * + * *
GitLab Endpoint: PUT /projects/:id/notification_settings
* * @param projectId the project ID to update the notification settings for @@ -137,7 +137,7 @@ public class NotificationSettingsApi extends AbstractApi { GitLabApiForm formData = new GitLabApiForm() .withParam("level", settings.getLevel()) - .withParam("email", settings.getEmail()); + .withParam("email", settings.getEmail()); Events events = settings.getEvents(); if (events != null) { diff --git a/src/main/java/org/gitlab4j/api/PackagesApi.java b/src/main/java/org/gitlab4j/api/PackagesApi.java index 3876c751..49f6c264 100644 --- a/src/main/java/org/gitlab4j/api/PackagesApi.java +++ b/src/main/java/org/gitlab4j/api/PackagesApi.java @@ -52,7 +52,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of pages in the project's packages * @throws GitLabApiException if any exception occurs */ @@ -66,7 +66,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Package instances per page * @return a list of project packages for the specified range @@ -84,7 +84,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Package instances per page * @return a Pager of project packages for the specified range * @throws GitLabApiException if any exception occurs @@ -99,7 +99,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter the PackageFilter instance holding the filter values for the query * @param itemsPerPage the number of Package instances per page * @return a Pager of project packages for the specified range @@ -117,7 +117,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of pages in the project's packages * @throws GitLabApiException if any exception occurs */ @@ -131,7 +131,7 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter the PackageFilter instance holding the filter values for the query * @return a Stream of pages in the project's packages * @throws GitLabApiException if any exception occurs @@ -145,12 +145,12 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages/:package_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to get * @return a Package instance for the specified package ID * @throws GitLabApiException if any exception occurs */ - public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { + public Package getPackage(Object projectIdOrPath, Long packageId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId); return (response.readEntity(Package.class)); @@ -161,12 +161,12 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to get the package files for * @return a list of PackageFile instances for the specified package ID * @throws GitLabApiException if any exception occurs */ - public List getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException { + public List getPackageFiles(Object projectIdOrPath, Long packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all()); } @@ -175,14 +175,14 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to get the package files for * @param page the page to get * @param perPage the number of PackageFile instances per page * @return a list of PackageFile instances for the specified package ID * @throws GitLabApiException if any exception occurs */ - public List getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException { + public List getPackageFiles(Object projectIdOrPath, Long packageId, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files"); return response.readEntity(new GenericType>() {}); @@ -193,13 +193,13 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to get the package files for * @param itemsPerPage the number of PackageFile instances per page * @return a Pager of PackageFile instances for the specified package ID * @throws GitLabApiException if any exception occurs */ - public Pager getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException { + public Pager getPackageFiles(Object projectIdOrPath, Long packageId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, PackageFile.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files")); } @@ -209,12 +209,12 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to get the package files for * @return a Stream of PackageFile instances for the specified package ID * @throws GitLabApiException if any exception occurs */ - public Stream getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException { + public Stream getPackagesStream(Object projectIdOrPath, Long packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream()); } @@ -223,11 +223,11 @@ public class PackagesApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/packages/:package_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param packageId the ID of the package to delete * @throws GitLabApiException if any exception occurs */ - public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { + public void deletePackage(Object projectIdOrPath, Long packageId) throws GitLabApiException { if (packageId == null) { throw new RuntimeException("packageId cannot be null"); diff --git a/src/main/java/org/gitlab4j/api/PipelineApi.java b/src/main/java/org/gitlab4j/api/PipelineApi.java index 9c91797f..06130a54 100644 --- a/src/main/java/org/gitlab4j/api/PipelineApi.java +++ b/src/main/java/org/gitlab4j/api/PipelineApi.java @@ -34,7 +34,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list containing the pipelines for the specified project ID * @throws GitLabApiException if any exception occurs during execution */ @@ -47,7 +47,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Pipeline instances per page * @return a list containing the pipelines for the specified project ID in the specified page range @@ -64,7 +64,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Pipeline instances that will be fetched per page * @return a Pager containing the pipelines for the specified project ID * @throws GitLabApiException if any exception occurs during execution @@ -79,7 +79,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream containing the pipelines for the specified project ID * @throws GitLabApiException if any exception occurs during execution */ @@ -92,7 +92,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter a PipelineFilter instance used to filter the results * @return a list containing the pipelines for the specified project ID and matching the provided filter * @throws GitLabApiException if any exception occurs during execution @@ -106,7 +106,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter a PipelineFilter instance used to filter the results * @param itemsPerPage the number of Pipeline instances that will be fetched per page * @return a Pager containing the pipelines for the specified project ID and matching the provided filter @@ -123,7 +123,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filter a PipelineFilter instance used to filter the results * @return a Stream containing the pipelines for the specified project ID and matching the provided filter * @throws GitLabApiException if any exception occurs during execution @@ -137,7 +137,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS * @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED * @param ref the ref of pipelines @@ -161,7 +161,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS * @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED * @param ref the ref of pipelines @@ -199,7 +199,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS * @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED * @param ref the ref of pipelines @@ -223,7 +223,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS * @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED * @param ref the ref of pipelines @@ -257,12 +257,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param pipelineId the pipeline ID to get * @return a single pipelines for the specified project ID * @throws GitLabApiException if any exception occurs during execution */ - public Pipeline getPipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException { + public Pipeline getPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId); return (response.readEntity(Pipeline.class)); } @@ -272,7 +272,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipeline
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref reference to commit * @return a Pipeline instance with the newly created pipeline info * @throws GitLabApiException if any exception occurs during execution @@ -286,7 +286,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipeline
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref reference to commit * @param variables a Map containing the variables available in the pipeline * @return a Pipeline instance with the newly created pipeline info @@ -301,7 +301,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipeline
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref reference to commit * @param variables a Map containing the variables available in the pipeline * @return a Pipeline instance with the newly created pipeline info @@ -342,11 +342,11 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param pipelineId the pipeline ID to delete * @throws GitLabApiException if any exception occurs during execution */ - public void deletePipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException { + public void deletePipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException { delete(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId); } @@ -355,12 +355,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/retry
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param pipelineId the pipeline ID to retry a job from * @return pipeline instance which just retried * @throws GitLabApiException if any exception occurs during execution */ - public Pipeline retryPipelineJob(Object projectIdOrPath, int pipelineId) throws GitLabApiException { + public Pipeline retryPipelineJob(Object projectIdOrPath, long pipelineId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "retry"); return (response.readEntity(Pipeline.class)); @@ -371,12 +371,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/cancel
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param pipelineId the pipeline ID to cancel jobs * @return pipeline instance which just canceled * @throws GitLabApiException if any exception occurs during execution */ - public Pipeline cancelPipelineJobs(Object projectIdOrPath, int pipelineId) throws GitLabApiException { + public Pipeline cancelPipelineJobs(Object projectIdOrPath, long pipelineId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "cancel"); return (response.readEntity(Pipeline.class)); @@ -387,7 +387,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedules
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of pipeline schedules for the specified project * @throws GitLabApiException if any exception occurs */ @@ -400,7 +400,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedules
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of PipelineSchedule instances per page * @return a list of project pipeline_schedules for the specified project in the specified page range @@ -416,7 +416,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedule
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of PipelineSchedule instances that will be fetched per page * @return a Pager of project pipeline_schedules for the specified project * @throws GitLabApiException if any exception occurs @@ -430,7 +430,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedule
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of project pipeline schedules for the specified project * @throws GitLabApiException if any exception occurs */ @@ -443,12 +443,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the ID of the pipeline schedule to get * @return the project PipelineSchedule * @throws GitLabApiException if any exception occurs */ - public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { + public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId); return (response.readEntity(PipelineSchedule.class)); } @@ -458,11 +458,11 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedules/:pipeline_schedule_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the ID of the hook to get * @return the project PipelineSchedule as an Optional instance */ - public Optional getOptionalPipelineSchedule (Object projectIdOrPath, Integer pipelineScheduleId) { + public Optional getOptionalPipelineSchedule (Object projectIdOrPath, Long pipelineScheduleId) { try { return (Optional.ofNullable(getPipelineSchedule(projectIdOrPath, pipelineScheduleId))); } catch (GitLabApiException glae) { @@ -475,7 +475,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
POST /projects/:id/pipeline_schedules
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineSchedule a PipelineSchedule instance to create * @return the added PipelineSchedule instance * @throws GitLabApiException if any exception occurs @@ -498,11 +498,11 @@ public class PipelineApi extends AbstractApi implements Constants { * *
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the project schedule ID to delete * @throws GitLabApiException if any exception occurs */ - public void deletePipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { + public void deletePipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId); } @@ -512,7 +512,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineSchedule the pipelineSchedule instance that contains the pipelineSchedule info to modify * @return the modified project schedule * @throws GitLabApiException if any exception occurs @@ -535,12 +535,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the pipelineSchedule instance id that ownership has to be taken of * @return the modified project schedule * @throws GitLabApiException if any exception occurs */ - public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { + public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException { Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership"); return (response.readEntity(PipelineSchedule.class)); @@ -551,14 +551,14 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the pipelineSchedule ID * @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed * @param value the value for the variable * @return a Pipeline instance with the newly created pipeline schedule variable * @throws GitLabApiException if any exception occurs during execution */ - public Variable createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, + public Variable createPipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId, String key, String value) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -574,14 +574,14 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the pipelineSchedule ID * @param key the key of an existing pipeline schedule variable * @param value the new value for the variable * @return a Pipeline instance with the updated variable * @throws GitLabApiException if any exception occurs during execution */ - public Variable updatePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, + public Variable updatePipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId, String key, String value) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("value", value, true); @@ -595,12 +595,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineScheduleId the pipeline schedule ID * @param key the key of an existing pipeline schedule variable * @throws GitLabApiException if any exception occurs */ - public void deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key) throws GitLabApiException { + public void deletePipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId, String key) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "variables", key); @@ -611,7 +611,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/triggers
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of pipeline triggers for the specified project * @throws GitLabApiException if any exception occurs */ @@ -624,7 +624,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/triggers
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of Trigger instances per page * @return a list of project pipeline triggers for the specified project in the specified page range @@ -640,7 +640,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedule
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of project pipeline triggers for the specified project * @throws GitLabApiException if any exception occurs @@ -654,7 +654,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipeline_schedule
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of project pipeline triggers for the specified project * @throws GitLabApiException if any exception occurs */ @@ -667,12 +667,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/triggers/:trigger_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param triggerId the ID of the trigger to get * @return the project pipeline trigger * @throws GitLabApiException if any exception occurs */ - public Trigger getPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException { + public Trigger getPipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId); return (response.readEntity(Trigger.class)); } @@ -682,11 +682,11 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/triggers/:trigger_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param triggerId the ID of the trigger to get * @return the project pipeline trigger as an Optional instance */ - public Optional getOptionalPipelineTrigger(Object projectIdOrPath, Integer triggerId) { + public Optional getOptionalPipelineTrigger(Object projectIdOrPath, Long triggerId) { try { return (Optional.ofNullable(getPipelineTrigger(projectIdOrPath, triggerId))); } catch (GitLabApiException glae) { @@ -699,7 +699,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
POST /projects/:id/triggers
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param description the trigger description * @return the created Trigger instance * @throws GitLabApiException if any exception occurs @@ -715,13 +715,13 @@ public class PipelineApi extends AbstractApi implements Constants { * *
PUT /projects/:id/triggers/:trigger_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param triggerId the trigger ID to update * @param description the new trigger description * @return the updated Trigger instance * @throws GitLabApiException if any exception occurs */ - public Trigger updatePipelineTrigger(Object projectIdOrPath, Integer triggerId, String description) throws GitLabApiException { + public Trigger updatePipelineTrigger(Object projectIdOrPath, Long triggerId, String description) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("description", description, false); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId); return (response.readEntity(Trigger.class)); @@ -732,11 +732,11 @@ public class PipelineApi extends AbstractApi implements Constants { * *
DELETE /projects/:id/triggers/:trigger_id
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param triggerId the project trigger ID to delete * @throws GitLabApiException if any exception occurs */ - public void deletePipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException { + public void deletePipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId); } @@ -745,12 +745,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
PUT /projects/:id/triggers/:trigger_id/take_ownership
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param triggerId the trigger ID to take opwnership of * @return the updated Trigger instance * @throws GitLabApiException if any exception occurs */ - public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException { + public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException { Response response = put(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId, "take_ownership"); return (response.readEntity(Trigger.class)); @@ -761,7 +761,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
POST /projects/:id/trigger/pipeline
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param trigger the Trigger instance holding the trigger token * @param ref the ref that the pipeline is to be triggered for * @param variables a List of variables to be passed with the trigger @@ -782,7 +782,7 @@ public class PipelineApi extends AbstractApi implements Constants { * *
POST /projects/:id/trigger/pipeline
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param token the trigger token * @param ref the ref that the pipeline is to be triggered for * @param variables a List of variables to be passed with the trigger @@ -804,12 +804,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipelines/:pipeline_id/variables
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineId the pipeline ID * @return a List of pipeline variables * @throws GitLabApiException if any exception occurs */ - public List getPipelineVariables(Object projectIdOrPath, Integer pipelineId) throws GitLabApiException { + public List getPipelineVariables(Object projectIdOrPath, Long pipelineId) throws GitLabApiException { return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).all()); } @@ -818,14 +818,14 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipelines/:pipeline_id/variables
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineId the pipeline ID * @param itemsPerPage the number of Pipeline instances that will be fetched per page * @return a Pager of pipeline variables * @throws GitLabApiException if any exception occurs */ - public Pager getPipelineVariables(Object projectIdOrPath, Integer pipelineId, int itemsPerPage) throws GitLabApiException { - return (new Pager(this, Variable.class, itemsPerPage, null, + public Pager getPipelineVariables(Object projectIdOrPath, Long pipelineId, int itemsPerPage) throws GitLabApiException { + return (new Pager(this, Variable.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "variables")); } @@ -834,12 +834,12 @@ public class PipelineApi extends AbstractApi implements Constants { * *
GET /projects/:id/pipelines/:pipeline_id/variables
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pipelineId the pipeline ID * @return a Stream of pipeline variables * @throws GitLabApiException if any exception occurs */ - public Stream getPipelineVariablesStream(Object projectIdOrPath, Integer pipelineId) throws GitLabApiException { + public Stream getPipelineVariablesStream(Object projectIdOrPath, Long pipelineId) throws GitLabApiException { return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream()); } } diff --git a/src/main/java/org/gitlab4j/api/ProjectApi.java b/src/main/java/org/gitlab4j/api/ProjectApi.java index 2ec7cab5..5843fae6 100644 --- a/src/main/java/org/gitlab4j/api/ProjectApi.java +++ b/src/main/java/org/gitlab4j/api/ProjectApi.java @@ -90,7 +90,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /project/:id/statistics
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a ProjectFetches instance with the project fetch statistics for the last 30 days * @throws GitLabApiException if any exception occurs during execution */ @@ -104,7 +104,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /project/:id/statistics
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return an Optional instance with the value for the project fetch statistics for the last 30 day */ public Optional getOptionalProjectStatistics(Object projectIdOrPath) { @@ -670,7 +670,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the specified project * @throws GitLabApiException if any exception occurs */ @@ -683,7 +683,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return an Optional instance with the specified project as a value */ public Optional getOptionalProject(Object projectIdOrPath) { @@ -699,7 +699,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param includeStatistics include project statistics * @return the specified project * @throws GitLabApiException if any exception occurs @@ -713,7 +713,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param includeStatistics include project statistics * @return an Optional instance with the specified project as a value */ @@ -730,7 +730,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param includeStatistics include project statistics * @param includeLicense include project license data * @param withCustomAttributes include custom attributes in response (admins only) @@ -753,7 +753,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param includeStatistics include project statistics * @param includeLicense include project license data * @param withCustomAttributes include custom attributes in response (admins only) @@ -876,7 +876,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return the created project * @throws GitLabApiException if any exception occurs */ - public Project createProject(Integer namespaceId, String projectName) throws GitLabApiException { + public Project createProject(Long namespaceId, String projectName) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace_id", namespaceId).withParam("name", projectName, true); Response response = post(Response.Status.CREATED, formData, "projects"); return (response.readEntity(Project.class)); @@ -890,7 +890,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return the created project * @throws GitLabApiException if any exception occurs */ - public Project createProject(Integer namespaceId, Project project) throws GitLabApiException { + public Project createProject(Long namespaceId, Project project) throws GitLabApiException { if (project == null) { throw new RuntimeException("Project instance cannot be null."); @@ -1071,7 +1071,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return the GitLab Project * @throws GitLabApiException if any exception occurs */ - public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, + public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException { if (isApiVersion(ApiVersion.V3)) { @@ -1117,7 +1117,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return the GitLab Project * @throws GitLabApiException if any exception occurs */ - public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, + public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, Boolean printingMergeRequestLinkEnabled, String importUrl) throws GitLabApiException { @@ -1167,7 +1167,7 @@ public class ProjectApi extends AbstractApi implements Constants { * Boolean, Boolean, Visibility, Integer, String)} */ @Deprecated - public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, + public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) throws GitLabApiException { if (name == null || name.trim().length() == 0) { @@ -1331,7 +1331,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @throws GitLabApiException if any exception occurs */ public void deleteProject(Object projectIdOrPath) throws GitLabApiException { @@ -1346,7 +1346,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/fork
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param namespace path of the namespace that the project will be forked to * @return the newly forked Project instance * @throws GitLabApiException if any exception occurs @@ -1362,13 +1362,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/fork
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param namespaceId ID of the namespace that the project will be forked to * @return the newly forked Project instance * @throws GitLabApiException if any exception occurs */ - public Project forkProject(Object projectIdOrPath, Integer namespaceId) throws GitLabApiException { - return forkProject(projectIdOrPath, Integer.toString(namespaceId)); + public Project forkProject(Object projectIdOrPath, Long namespaceId) throws GitLabApiException { + return forkProject(projectIdOrPath, Long.toString(namespaceId)); } /** @@ -1378,7 +1378,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/fork
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param namespace path of the namespace that the project will be forked to * @param path the path that will be assigned to the resultant project after forking * @param name the name that will be assigned to the resultant project after forking @@ -1401,12 +1401,12 @@ public class ProjectApi extends AbstractApi implements Constants { *
GitLab Endpoint: POST /projects/:id/fork/:forkFromId
* * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param forkedFromId the ID of the project that was forked from * @return the updated Project instance * @throws GitLabApiException if any exception occurs */ - public Project createForkedFromRelationship(Object projectIdOrPath, Integer forkedFromId) throws GitLabApiException { + public Project createForkedFromRelationship(Object projectIdOrPath, Long forkedFromId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED); Response response = post(expectedStatus, (Form)null, "projects", this.getProjectIdOrPath(projectIdOrPath), "fork", forkedFromId); return (response.readEntity(Project.class)); @@ -1417,7 +1417,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/fork
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @throws GitLabApiException if any exception occurs */ public void deleteForkedFromRelationship(Object projectIdOrPath) throws GitLabApiException { @@ -1430,7 +1430,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the members belonging to the specified project * @throws GitLabApiException if any exception occurs */ @@ -1443,7 +1443,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Member instances per page * @return the members belonging to the specified project @@ -1459,7 +1459,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return the members belonging to the specified project * @throws GitLabApiException if any exception occurs @@ -1473,7 +1473,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of the members belonging to the specified project * @throws GitLabApiException if any exception occurs */ @@ -1489,7 +1489,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the project members viewable by the authenticated user, including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ @@ -1505,7 +1505,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Member instances per page * @return the project members viewable by the authenticated user, including inherited members through ancestor groups @@ -1527,7 +1527,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of the project members viewable by the authenticated user, * including inherited members through ancestor groups @@ -1545,7 +1545,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of the project members viewable by the authenticated user, * including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs @@ -1562,13 +1562,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param query a query string to search for members * @param userIds filter the results on the given user IDs * @return the project members viewable by the authenticated user, including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public List getAllMembers(Object projectIdOrPath, String query, List userIds) throws GitLabApiException { + public List getAllMembers(Object projectIdOrPath, String query, List userIds) throws GitLabApiException { return (getAllMembers(projectIdOrPath, query, userIds, getDefaultPerPage()).all()); } @@ -1580,7 +1580,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param query a query string to search for members * @param userIds filter the results on the given user IDs * @param itemsPerPage the number of Project instances that will be fetched per page @@ -1588,7 +1588,7 @@ public class ProjectApi extends AbstractApi implements Constants { * including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public Pager getAllMembers(Object projectIdOrPath, String query, List userIds, int itemsPerPage) throws GitLabApiException { + public Pager getAllMembers(Object projectIdOrPath, String query, List userIds, int itemsPerPage) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("query", query).withParam("user_ids", userIds); return (new Pager(this, Member.class, itemsPerPage, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "members", "all")); @@ -1602,14 +1602,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param query a query string to search for members * @param userIds filter the results on the given user IDs * @return a Stream of the project members viewable by the authenticated user, * including inherited members through ancestor groups * @throws GitLabApiException if any exception occurs */ - public Stream getAllMembersStream(Object projectIdOrPath, String query, List userIds) throws GitLabApiException { + public Stream getAllMembersStream(Object projectIdOrPath, String query, List userIds) throws GitLabApiException { return (getAllMembers(projectIdOrPath, query, userIds, getDefaultPerPage()).stream()); } @@ -1618,12 +1618,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member * @return the member specified by the project ID/user ID pair * @throws GitLabApiException if any exception occurs */ - public Member getMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { + public Member getMember(Object projectIdOrPath, Long userId) throws GitLabApiException { return (getMember(projectIdOrPath, userId, false)); } @@ -1632,11 +1632,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member * @return the member specified by the project ID/user ID pair */ - public Optional getOptionalMember(Object projectIdOrPath, Integer userId) { + public Optional getOptionalMember(Object projectIdOrPath, Long userId) { try { return (Optional.ofNullable(getMember(projectIdOrPath, userId, false))); } catch (GitLabApiException glae) { @@ -1649,13 +1649,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member * @param includeInherited if true will the member even if inherited thru an ancestor group * @return the member specified by the project ID/user ID pair * @throws GitLabApiException if any exception occurs */ - public Member getMember(Object projectIdOrPath, Integer userId, Boolean includeInherited) throws GitLabApiException { + public Member getMember(Object projectIdOrPath, Long userId, Boolean includeInherited) throws GitLabApiException { Response response; if (includeInherited) { response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", "all", userId); @@ -1670,12 +1670,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/members/all/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member * @param includeInherited if true will the member even if inherited thru an ancestor group * @return the member specified by the project ID/user ID pair as the value of an Optional */ - public Optional getOptionalMember(Object projectIdOrPath, Integer userId, Boolean includeInherited) { + public Optional getOptionalMember(Object projectIdOrPath, Long userId, Boolean includeInherited) { try { return (Optional.ofNullable(getMember(projectIdOrPath, userId, includeInherited))); } catch (GitLabApiException glae) { @@ -1690,13 +1690,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to add, required * @param accessLevel the access level for the new member, required * @return the added member * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { + public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException { return (addMember(projectIdOrPath, userId, accessLevel, null)); } @@ -1707,13 +1707,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to add, required * @param accessLevel the access level for the new member, required * @return the added member * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { return (addMember(projectIdOrPath, userId, accessLevel.toValue(), null)); } @@ -1724,14 +1724,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to add * @param accessLevel the access level for the new member * @param expiresAt the date the membership in the group will expire * @return the added member * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { + public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { return (addMember(projectIdOrPath, userId, accessLevel.toValue(), expiresAt)); } @@ -1742,14 +1742,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/members
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to add * @param accessLevel the access level for the new member * @param expiresAt the date the membership in the group will expire * @return the added member * @throws GitLabApiException if any exception occurs */ - public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { + public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("user_id", userId, true) .withParam("access_level", accessLevel, true) @@ -1763,13 +1763,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:projectId/members/:userId
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to update, required * @param accessLevel the new access level for the member, required * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { + public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException { return (updateMember(projectIdOrPath, userId, accessLevel, null)); } @@ -1778,13 +1778,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:projectId/members/:userId
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to update, required * @param accessLevel the new access level for the member, required * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { return (updateMember(projectIdOrPath, userId, accessLevel.toValue(), null)); } @@ -1793,14 +1793,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:projectId/members/:userId
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID of the member to update, required * @param accessLevel the new access level for the member, required * @param expiresAt the date the membership in the group will expire, optional * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { + public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { return (updateMember(projectIdOrPath, userId, accessLevel.toValue(), expiresAt)); } @@ -1809,14 +1809,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:projectId/members/:userId
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param userId the user ID of the member to update, required * @param accessLevel the new access level for the member, required * @param expiresAt the date the membership in the group will expire, optional * @return the updated member * @throws GitLabApiException if any exception occurs */ - public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { + public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("access_level", accessLevel, true) .withParam("expires_at", expiresAt, false); @@ -1829,11 +1829,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/members/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param userId the user ID of the member to remove * @throws GitLabApiException if any exception occurs */ - public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { + public void removeMember(Object projectIdOrPath, Long userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId); } @@ -1843,7 +1843,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the users belonging to the specified project and its parent groups * @throws GitLabApiException if any exception occurs */ @@ -1856,7 +1856,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of the users matching the search string and belonging to the specified project and its parent groups * @throws GitLabApiException if any exception occurs @@ -1870,7 +1870,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of the users belonging to the specified project and its parent groups * @throws GitLabApiException if any exception occurs */ @@ -1884,7 +1884,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param search the string to match specific users * @return the users matching the search string and belonging to the specified project and its parent groups * @throws GitLabApiException if any exception occurs @@ -1899,7 +1899,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param search the string to match specific users * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of the users matching the search string and belonging to the specified project and its parent groups @@ -1917,7 +1917,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/users
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param search the string to match specific users * @return a Stream of the users matching the search string and belonging to the specified project and its parent groups * @throws GitLabApiException if any exception occurs @@ -1931,7 +1931,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the project events for the specified project * @throws GitLabApiException if any exception occurs */ @@ -1944,7 +1944,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of Event instances per page * @return the project events for the specified project @@ -1960,7 +1960,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of project events for the specified project * @throws GitLabApiException if any exception occurs @@ -1974,7 +1974,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/events
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of the project events for the specified project * @throws GitLabApiException if any exception occurs */ @@ -1987,7 +1987,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of project hooks for the specified project * @throws GitLabApiException if any exception occurs */ @@ -2000,7 +2000,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of ProjectHook instances per page * @return a list of project hooks for the specified project in the specified page range @@ -2016,7 +2016,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of project hooks for the specified project * @throws GitLabApiException if any exception occurs @@ -2030,7 +2030,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of project hooks for the specified project * @throws GitLabApiException if any exception occurs */ @@ -2043,12 +2043,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks/:hook_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param hookId the ID of the hook to get * @return the project hook for the specified project ID/hook ID pair * @throws GitLabApiException if any exception occurs */ - public ProjectHook getHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { + public ProjectHook getHook(Object projectIdOrPath, Long hookId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); return (response.readEntity(ProjectHook.class)); } @@ -2058,11 +2058,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/hooks/:hook_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param hookId the ID of the hook to get * @return the project hook for the specified project ID/hook ID pair as an Optional instance */ - public Optional getOptionalHook(Object projectIdOrPath, Integer hookId) { + public Optional getOptionalHook(Object projectIdOrPath, Long hookId) { try { return (Optional.ofNullable(getHook(projectIdOrPath, hookId))); } catch (GitLabApiException glae) { @@ -2075,7 +2075,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param url the callback URL for the hook * @param enabledHooks a ProjectHook instance specifying which hooks to enable * @param enableSslVerification enable SSL verification @@ -2114,7 +2114,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/hooks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param url the callback URL for the hook * @param doPushEvents flag specifying whether to do push events * @param doIssuesEvents flag specifying whether to do issues events @@ -2140,11 +2140,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/hooks/:hook_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param hookId the project hook ID to delete * @throws GitLabApiException if any exception occurs */ - public void deleteHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { + public void deleteHook(Object projectIdOrPath, Long hookId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); } @@ -2200,7 +2200,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of project's issues * @throws GitLabApiException if any exception occurs * @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)} @@ -2215,7 +2215,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of issues per page * @return the list of issues in the specified range @@ -2233,7 +2233,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of issues per page * @return the list of issues in the specified range * @throws GitLabApiException if any exception occurs @@ -2249,7 +2249,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of the project's issues * @throws GitLabApiException if any exception occurs * @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)} @@ -2264,14 +2264,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueId the internal ID of a project's issue * @return the specified Issue instance * @throws GitLabApiException if any exception occurs * @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssue(Object, Integer)} */ @Deprecated - public Issue getIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { + public Issue getIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId); return (response.readEntity(Issue.class)); } @@ -2281,13 +2281,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param issueId the internal ID of a project's issue * @throws GitLabApiException if any exception occurs * @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#deleteIssue(Object, Integer)} */ @Deprecated - public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { + public void deleteIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId); } @@ -2297,7 +2297,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of the project's snippets * @throws GitLabApiException if any exception occurs */ @@ -2310,7 +2310,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of snippets per page * @return a list of project's snippets for the specified range @@ -2326,7 +2326,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of snippets per page * @return the Pager of snippets * @throws GitLabApiException if any exception occurs @@ -2340,7 +2340,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of the project's snippets * @throws GitLabApiException if any exception occurs */ @@ -2353,12 +2353,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of the project's snippet * @return the specified project Snippet * @throws GitLabApiException if any exception occurs */ - public Snippet getSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public Snippet getSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); return (response.readEntity(Snippet.class)); } @@ -2368,11 +2368,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of the project's snippet * @return the specified project Snippet as an Optional instance */ - public Optional getOptionalSnippet(Object projectIdOrPath, Integer snippetId) { + public Optional getOptionalSnippet(Object projectIdOrPath, Long snippetId) { try { return (Optional.ofNullable(getSnippet(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { @@ -2385,7 +2385,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/snippets
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param title the title of a snippet, required * @param filename the name of a snippet file, required * @param description the description of a snippet, optional @@ -2433,7 +2433,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/snippets/:snippet_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of a project's snippet, required * @param title the title of a snippet, optional * @param filename the name of a snippet file, optional @@ -2443,7 +2443,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return a Snippet instance with info on the updated snippet * @throws GitLabApiException if any exception occurs */ - public Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description, + public Snippet updateSnippet(Object projectIdOrPath, Long snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() @@ -2463,11 +2463,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/snippets/:snippet_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of the project's snippet * @throws GitLabApiException if any exception occurs */ - public void deleteSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public void deleteSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); } @@ -2476,12 +2476,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of the project's snippet * @return the raw project snippet plain text as an Optional instance * @throws GitLabApiException if any exception occurs */ - public String getRawSnippetContent(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { + public String getRawSnippetContent(Object projectIdOrPath, Long snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "raw"); return (response.readEntity(String.class)); } @@ -2491,11 +2491,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param snippetId the ID of the project's snippet * @return the raw project snippet plain text as an Optional instance */ - public Optional getOptionalRawSnippetContent(Object projectIdOrPath, Integer snippetId) { + public Optional getOptionalRawSnippetContent(Object projectIdOrPath, Long snippetId) { try { return (Optional.ofNullable(getRawSnippetContent(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { @@ -2508,13 +2508,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/share
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param groupId the ID of the group to share with, required * @param accessLevel the permissions level to grant the group, required * @param expiresAt the share expiration date, optional * @throws GitLabApiException if any exception occurs */ - public void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt) + public void shareProject(Object projectIdOrPath, Long groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("group_id", groupId, true) @@ -2528,11 +2528,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/share/:group_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param groupId the ID of the group to unshare, required * @throws GitLabApiException if any exception occurs */ - public void unshareProject(Object projectIdOrPath, Integer groupId) throws GitLabApiException { + public void unshareProject(Object projectIdOrPath, Long groupId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "share", groupId); } @@ -2542,7 +2542,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the archived GitLab Project * @throws GitLabApiException if any exception occurs */ @@ -2557,7 +2557,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/unarchive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the unarchived GitLab Project * @throws GitLabApiException if any exception occurs */ @@ -2572,7 +2572,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/uploads
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param fileToUpload the File instance of the file to upload, required * @return a FileUpload instance with information on the just uploaded file * @throws GitLabApiException if any exception occurs @@ -2586,7 +2586,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/uploads
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param fileToUpload the File instance of the file to upload, required * @param mediaType unused; will be removed in the next major version * @return a FileUpload instance with information on the just uploaded file @@ -2618,7 +2618,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/push_rule
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return the push rules for the specified project * @throws GitLabApiException if any exception occurs */ @@ -2648,7 +2648,7 @@ public class ProjectApi extends AbstractApi implements Constants { * rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG * * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pushRule the PushRule instance containing the push rule configuration to add * @return a PushRules instance with the newly created push rule info * @throws GitLabApiException if any exception occurs @@ -2692,7 +2692,7 @@ public class ProjectApi extends AbstractApi implements Constants { * rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG * * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param pushRule the PushRules instance containing the push rule configuration to update * @return a PushRules instance with the newly created push rule info * @throws GitLabApiException if any exception occurs @@ -2721,7 +2721,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/push_rule
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @throws GitLabApiException if any exception occurs */ public void deletePushRules(Object projectIdOrPath) throws GitLabApiException { @@ -2733,7 +2733,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/forks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a List of forked projects * @throws GitLabApiException if any exception occurs */ @@ -2746,7 +2746,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/forks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of projects per page * @return a List of forked projects @@ -2762,7 +2762,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/forks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager of projects * @throws GitLabApiException if any exception occurs @@ -2776,7 +2776,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/forks
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of forked projects * @throws GitLabApiException if any exception occurs */ @@ -2819,7 +2819,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/languages
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Map instance with the language as the key and the percentage as the value * @throws GitLabApiException if any exception occurs * @since GitLab 10.8 @@ -2834,7 +2834,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/transfer.
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param namespace the namespace to transfer the project to * @return the updated Project * @throws GitLabApiException if any exception occurs @@ -2850,7 +2850,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param avatarFile the File instance of the avatar file to upload * @return the updated Project instance * @throws GitLabApiException if any exception occurs @@ -2921,7 +2921,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return the project Audit event * @throws GitLabApiException if any exception occurs */ - public AuditEvent getAuditEvent(Object projectIdOrPath, Integer auditEventId) throws GitLabApiException { + public AuditEvent getAuditEvent(Object projectIdOrPath, Long auditEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "audit_events", auditEventId); return (response.readEntity(AuditEvent.class)); } @@ -2931,7 +2931,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a list of variables belonging to the specified project * @throws GitLabApiException if any exception occurs */ @@ -2944,7 +2944,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param page the page to get * @param perPage the number of Variable instances per page * @return a list of variables belonging to the specified project in the specified page range @@ -2960,7 +2960,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param itemsPerPage the number of Variable instances that will be fetched per page * @return a Pager of variables belonging to the specified project * @throws GitLabApiException if any exception occurs @@ -2974,7 +2974,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @return a Stream of variables belonging to the specified project * @throws GitLabApiException if any exception occurs */ @@ -2987,7 +2987,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @return the Variable instance for the specified variable * @throws GitLabApiException if any exception occurs @@ -3002,7 +3002,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @return the Variable for the specified variable as an Optional instance */ @@ -3019,7 +3019,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required * @param value the value for the variable, required * @param isProtected whether the variable is protected, optional @@ -3037,7 +3037,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required * @param value the value for the variable, required * @param isProtected whether the variable is protected, optional @@ -3056,7 +3056,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required * @param value the value for the variable, required * @param variableType the type of variable. Available types are: env_var (default) and file @@ -3077,7 +3077,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/variables
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required * @param value the value for the variable, required * @param variableType the type of variable. Available types are: env_var (default) and file @@ -3106,7 +3106,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @param value the value for the variable, required * @param isProtected whether the variable is protected, optional @@ -3124,7 +3124,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @param value the value for the variable, required * @param isProtected whether the variable is protected, optional @@ -3143,7 +3143,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @param value the value for the variable, required * @param variableType the type of variable. Available types are: env_var (default) and file @@ -3164,7 +3164,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @param value the value for the variable, required * @param variableType the type of variable. Available types are: env_var (default) and file @@ -3192,7 +3192,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/variables/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key of an existing variable, required * @throws GitLabApiException if any exception occurs */ @@ -3205,7 +3205,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/access_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a List of project AccessRequest instances accessible by the authenticated user * @throws GitLabApiException if any exception occurs */ @@ -3218,7 +3218,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/access_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of AccessRequest instances that will be fetched per page * @return a Pager of project AccessRequest instances accessible by the authenticated user * @throws GitLabApiException if any exception occurs @@ -3232,7 +3232,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/access_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project AccessRequest instances accessible by the authenticated user * @throws GitLabApiException if any exception occurs */ @@ -3245,7 +3245,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/access_requests
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the created AccessRequest instance * @throws GitLabApiException if any exception occurs */ @@ -3259,13 +3259,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/access_requests/:user_id/approve
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID to approve access for * @param accessLevel the access level the user is approved for, if null will be developer (30) * @return the approved AccessRequest instance * @throws GitLabApiException if any exception occurs */ - public AccessRequest approveAccessRequest(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException { + public AccessRequest approveAccessRequest(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("access_level", accessLevel); Response response = this.putWithFormData(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId, "approve"); @@ -3277,11 +3277,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/access_requests/:user_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param userId the user ID to deny access for * @throws GitLabApiException if any exception occurs */ - public void denyAccessRequest(Object projectIdOrPath, Integer userId) throws GitLabApiException { + public void denyAccessRequest(Object projectIdOrPath, Long userId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId); } @@ -3291,7 +3291,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/housekeeping
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @throws GitLabApiException if any exception occurs */ public void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException { @@ -3303,7 +3303,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/badges
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a List of Badge instances for the specified project * @throws GitLabApiException if any exception occurs */ @@ -3317,12 +3317,12 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/badges/:badge_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param badgeId the ID of the badge to get * @return a Badge instance for the specified project/badge ID pair * @throws GitLabApiException if any exception occurs */ - public Badge getBadge(Object projectIdOrPath, Integer badgeId) throws GitLabApiException { + public Badge getBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "badges", badgeId); return (response.readEntity(Badge.class)); } @@ -3332,11 +3332,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/badges/:badge_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param badgeId the ID of the badge to get * @return an Optional instance with the specified badge as the value */ - public Optional getOptionalBadge(Object projectIdOrPath, Integer badgeId) { + public Optional getOptionalBadge(Object projectIdOrPath, Long badgeId) { try { return (Optional.ofNullable(getBadge(projectIdOrPath, badgeId))); } catch (GitLabApiException glae) { @@ -3349,7 +3349,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/badges
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param linkUrl the URL of the badge link * @param imageUrl the URL of the image link * @return a Badge instance for the added badge @@ -3368,14 +3368,14 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/badges
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param badgeId the ID of the badge to get * @param linkUrl the URL of the badge link * @param imageUrl the URL of the image link * @return a Badge instance for the editted badge * @throws GitLabApiException if any exception occurs */ - public Badge editBadge(Object projectIdOrPath, Integer badgeId, String linkUrl, String imageUrl) throws GitLabApiException { + public Badge editBadge(Object projectIdOrPath, Long badgeId, String linkUrl, String imageUrl) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("link_url", linkUrl, false) .withParam("image_url", imageUrl, false); @@ -3388,11 +3388,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/badges/:badge_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param badgeId the ID of the badge to remove * @throws GitLabApiException if any exception occurs */ - public void removeBadge(Object projectIdOrPath, Integer badgeId) throws GitLabApiException { + public void removeBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "badges", badgeId); } @@ -3401,7 +3401,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/badges/render
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param linkUrl the URL of the badge link * @param imageUrl the URL of the image link * @return a Badge instance for the rendered badge @@ -3421,7 +3421,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/approvals
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a ProjectApprovalsConfig instance with the project's approvals configuration * @throws GitLabApiException if any exception occurs */ @@ -3436,7 +3436,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/approvals
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param config a ProjectApprovalsConfig instance with the approval configuration * @return a ProjectApprovalsConfig instance with the project's approvals configuration * @throws GitLabApiException if any exception occurs @@ -3453,7 +3453,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a List of ApprovalRuke instances for the specified project. * @throws GitLabApiException if any exception occurs */ @@ -3467,7 +3467,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of ApprovalRule instances that will be fetched per page * @return a Pager of ApprovalRuke instances for the specified project. * @throws GitLabApiException if any exception occurs @@ -3484,7 +3484,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of ApprovalRule instances for the specified project. * @throws GitLabApiException if any exception occurs */ @@ -3498,7 +3498,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/approval_rules
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param params the ApprovalRuleParams instance holding the parameters for the approval rule * @return a ApprovalRule instance with approval configuration * @throws GitLabApiException if any exception occurs @@ -3516,13 +3516,13 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/approval_rules/:approval_rule_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param approvalRuleId the ID of the approval rule * @param params the ApprovalRuleParams instance holding the parameters for the approval rule update * @return a ApprovalRule instance with approval configuration * @throws GitLabApiException if any exception occurs */ - public ApprovalRule updateApprovalRule(Object projectIdOrPath, Integer approvalRuleId, ApprovalRuleParams params) throws GitLabApiException { + public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException { if (approvalRuleId == null) { throw new RuntimeException("approvalRuleId cannot be null"); @@ -3540,11 +3540,11 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/approval_rules/:approval_rule_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param approvalRuleId the ID of the approval rule * @throws GitLabApiException if any exception occurs */ - public void deleteApprovalRule(Object projectIdOrPath, Integer approvalRuleId) throws GitLabApiException { + public void deleteApprovalRule(Object projectIdOrPath, Long approvalRuleId) throws GitLabApiException { if (approvalRuleId == null) { throw new RuntimeException("approvalRuleId cannot be null"); @@ -3558,7 +3558,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/custom_attributes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's CustomAttributes * @throws GitLabApiException if any exception occurs */ @@ -3571,7 +3571,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/custom_attributes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of items per page * @return a Pager of project's custom attributes * @throws GitLabApiException if any exception occurs @@ -3586,7 +3586,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/custom_attributes
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's custom attributes * @throws GitLabApiException if any exception occurs */ @@ -3599,7 +3599,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/custom_attributes/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param key the key for the custom attribute * @return a CustomAttribute instance for the specified key * @throws GitLabApiException if any exception occurs @@ -3615,7 +3615,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/custom_attributes/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param key the key for the custom attribute, required * @return an Optional instance with the value for a single custom attribute for the specified project */ @@ -3633,7 +3633,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/custom_attributes/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param key the key for the custom attribute * @param value the value for the customAttribute * @return a CustomAttribute instance for the updated or created custom attribute @@ -3659,7 +3659,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: DELETE /projects/:id/custom_attributes/:key
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param key the key of the custom attribute to delete * @throws GitLabApiException if any exception occurs */ @@ -3677,7 +3677,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/remote_mirrors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of project's remote mirrors * @throws GitLabApiException if any exception occurs */ @@ -3690,7 +3690,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/remote_mirrors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of items per page * @return a Pager of project's remote mirrors * @throws GitLabApiException if any exception occurs @@ -3705,7 +3705,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: GET /projects/:id/remote_mirrors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of project's remote mirrors * @throws GitLabApiException if any exception occurs */ @@ -3719,7 +3719,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: POST /projects/:id/remote_mirrors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param url the URL of the remote repository to be mirrored * @param enabled determines if the mirror is enabled * @param onlyProtectedBranches determines if only protected branches are mirrored @@ -3744,7 +3744,7 @@ public class ProjectApi extends AbstractApi implements Constants { * *
GitLab Endpoint: PUT /projects/:id/remote_mirrors/:mirror_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param mirrorId the ID of the remote mirror * @param enabled determines if the mirror is enabled * @param onlyProtectedBranches determines if only protected branches are mirrored @@ -3752,7 +3752,7 @@ public class ProjectApi extends AbstractApi implements Constants { * @return a RemoteMirror instance with the updated remote mirror configuration * @throws GitLabApiException if any exception occurs */ - public RemoteMirror updateRemoteMirror(Object projectIdOrPath, Integer mirrorId, Boolean enabled, + public RemoteMirror updateRemoteMirror(Object projectIdOrPath, Long mirrorId, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() diff --git a/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java b/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java index 2ab75d7e..c64f416f 100644 --- a/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java +++ b/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java @@ -26,7 +26,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the list of protected branches for the project * @throws GitLabApiException if any exception occurs */ @@ -39,7 +39,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of instances that will be fetched per page * @return the Pager of protected branches for the project * @throws GitLabApiException if any exception occurs @@ -54,7 +54,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the Stream of protected branches for the project * @throws GitLabApiException if any exception occurs */ @@ -67,7 +67,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/protected_branches/:branch_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch or wildcard * @return a ProtectedBranch instance with info on the protected branch * @throws GitLabApiException if any exception occurs @@ -83,7 +83,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/protected_branches/:branch_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch or wildcard * @return an Optional instance with the specified protected branch as a value */ @@ -100,7 +100,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/protected_branches/:name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to un-protect, can be a wildcard * @throws GitLabApiException if any exception occurs */ @@ -114,7 +114,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect, can be a wildcard * @return the branch info for the protected branch * @throws GitLabApiException if any exception occurs @@ -128,7 +128,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect, can be a wildcard * @param pushAccessLevel Access levels allowed to push (defaults: 40, maintainer access level) * @param mergeAccessLevel Access levels allowed to merge (defaults: 40, maintainer access level) @@ -144,7 +144,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect, can be a wildcard * @param pushAccessLevel access levels allowed to push (defaults: 40, maintainer access level) * @param mergeAccessLevel access levels allowed to merge (defaults: 40, maintainer access level) @@ -174,7 +174,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect, can be a wildcard * @param allowedToPushUserId user ID allowed to push, can be null * @param allowedToMergeUserId user ID allowed to merge, can be null @@ -205,7 +205,7 @@ public class ProtectedBranchesApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/protected_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect, can be a wildcard * @param allowedToPush an AllowedTo instance holding the configuration for "allowed_to_push" * @param allowedToMerge an AllowedTo instance holding the configuration for "allowed_to_merge" diff --git a/src/main/java/org/gitlab4j/api/ReleasesApi.java b/src/main/java/org/gitlab4j/api/ReleasesApi.java index 8095fd88..44b06cd9 100644 --- a/src/main/java/org/gitlab4j/api/ReleasesApi.java +++ b/src/main/java/org/gitlab4j/api/ReleasesApi.java @@ -136,7 +136,7 @@ public class ReleasesApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/releases/:tag_name
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param tagName the tag name that the release was created from * @throws GitLabApiException if any exception occurs */ diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/src/main/java/org/gitlab4j/api/RepositoryApi.java index fd6dbbd4..620781ec 100644 --- a/src/main/java/org/gitlab4j/api/RepositoryApi.java +++ b/src/main/java/org/gitlab4j/api/RepositoryApi.java @@ -43,7 +43,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return the list of repository branches for the specified project * @throws GitLabApiException if any exception occurs */ @@ -56,7 +56,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of Branch instances per page * @return the list of repository branches for the specified project @@ -73,7 +73,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return the list of repository branches for the specified project ID * @@ -88,7 +88,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of repository branches for the specified project * @throws GitLabApiException if any exception occurs */ @@ -101,7 +101,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches/:branch
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to get * @return the branch info for the specified project ID/branch name pair * @throws GitLabApiException if any exception occurs @@ -117,7 +117,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches?search=:search
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param search the branch name search term * @return the List of repository branches for the specified project ID and search term * @throws GitLabApiException if any exception occurs @@ -131,7 +131,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches?search=:search
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param search the branch name search term * @param itemsPerPage the number of Project instances that will be fetched per page * @return the list of repository branches for the specified project ID and search term @@ -151,7 +151,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches?search=:search
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param search the branch name search term * @return the Stream of repository branches for the specified project ID and search term * @@ -166,7 +166,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/branches/:branch
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to get * @return an Optional instance with the info for the specified project ID/branch name pair as the value * @throws GitLabApiException if any exception occurs @@ -184,7 +184,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to create * @param ref Source to create the branch from, can be an existing branch, tag or commit SHA * @return the branch info for the created branch @@ -205,7 +205,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to delete * @throws GitLabApiException if any exception occurs */ @@ -221,7 +221,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/protect
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to protect * @return the branch info for the protected branch * @throws GitLabApiException if any exception occurs @@ -238,7 +238,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/unprotect
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to un-protect * @return the branch info for the unprotected branch * @throws GitLabApiException if any exception occurs @@ -254,7 +254,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/tree
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a tree with the root directories and files of a project * @throws GitLabApiException if any exception occurs */ @@ -267,7 +267,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/tree
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager containing a tree with the root directories and files of a project * @throws GitLabApiException if any exception occurs @@ -281,7 +281,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/tree
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream containing a tree with the root directories and files of a project * @throws GitLabApiException if any exception occurs */ @@ -298,7 +298,7 @@ public class RepositoryApi extends AbstractApi { * path (optional) - The path inside repository. Used to get content of subdirectories * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @return a tree with the directories and files of a project @@ -317,7 +317,7 @@ public class RepositoryApi extends AbstractApi { * path (optional) - The path inside repository. Used to get content of subdirectories * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @param itemsPerPage the number of Project instances that will be fetched per page @@ -337,7 +337,7 @@ public class RepositoryApi extends AbstractApi { * path (optional) - The path inside repository. Used to get content of subdirectories * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @return a Stream containing a tree with the directories and files of a project @@ -357,7 +357,7 @@ public class RepositoryApi extends AbstractApi { * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * recursive (optional) - Boolean value used to get a recursive tree (false by default) * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @param recursive flag to get a recursive tree or not @@ -378,7 +378,7 @@ public class RepositoryApi extends AbstractApi { * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * recursive (optional) - Boolean value used to get a recursive tree (false by default) * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @param recursive flag to get a recursive tree or not @@ -406,7 +406,7 @@ public class RepositoryApi extends AbstractApi { * ref_name (optional) - The name of a repository branch or tag or if not given the default branch * recursive (optional) - Boolean value used to get a recursive tree (false by default) * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path inside repository, used to get content of subdirectories * @param refName the name of a repository branch or tag or if not given the default branch * @param recursive flag to get a recursive tree or not @@ -422,7 +422,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/raw_blobs/:sha
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the file to get the contents for * @return the raw file contents for the blob on an InputStream * @throws GitLabApiException if any exception occurs @@ -438,7 +438,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @return an input stream that can be used to save as a file * or to read the content of the archive @@ -456,7 +456,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @param format The archive format, defaults to "tar.gz" if null * @return an input stream that can be used to save as a file or to read the content of the archive @@ -472,7 +472,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @param format The archive format, defaults to TAR_GZ if null * @return an input stream that can be used to save as a file or to read the content of the archive @@ -503,7 +503,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir" * @return a File instance pointing to the downloaded instance @@ -538,7 +538,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir" * @param format The archive format, defaults to "tar.gz" if null @@ -556,7 +556,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/archive
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param sha the SHA of the archive to get * @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir" * @param format The archive format, defaults to TAR_GZ if null @@ -601,7 +601,7 @@ public class RepositoryApi extends AbstractApi { * Compare branches, tags or commits. This can be accessed without authentication * if the repository is publicly accessible. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param from the commit SHA or branch name * @param to the commit SHA or branch name * @param straight specifies the comparison method, true for direct comparison between from and to (from..to), @@ -623,7 +623,7 @@ public class RepositoryApi extends AbstractApi { * Compare branches, tags or commits. This can be accessed without authentication * if the repository is publicly accessible. * - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param from the commit SHA or branch name * @param to the commit SHA or branch name * @return a CompareResults containing the results of the comparison @@ -638,7 +638,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/contributors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a List containing the contributors for the specified project ID * @throws GitLabApiException if any exception occurs */ @@ -651,7 +651,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/contributors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of projects per page * @return a List containing the contributors for the specified project ID @@ -668,7 +668,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/contributors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return a Pager containing the contributors for the specified project ID * @throws GitLabApiException if any exception occurs @@ -683,7 +683,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/contributors
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a List containing the contributors for the specified project ID * @throws GitLabApiException if any exception occurs */ @@ -696,7 +696,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/merge_base
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param refs a List of 2 or more refs (commit SHAs, branch names or tags) * @return the Commit instance containing the common ancestor * @throws GitLabApiException if any exception occurs @@ -724,7 +724,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/merge_base
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param refs a List of 2 or more refs (commit SHAs, branch names or tags) * @return an Optional instance with the Commit instance containing the common ancestor as the value * @throws GitLabApiException if any exception occurs @@ -743,7 +743,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: /projects/:id/repository/merged_branches
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @throws GitLabApiException if any exception occurs */ public void deleteMergedBranches(Object projectIdOrPath) throws GitLabApiException { @@ -756,7 +756,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/changelog
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param version the version to generate the changelog for * @throws GitLabApiException if any exception occurs */ @@ -769,7 +769,7 @@ public class RepositoryApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/repository/changelog
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param payload the payload to generate the changelog for * @throws GitLabApiException if any exception occurs */ diff --git a/src/main/java/org/gitlab4j/api/RepositoryFileApi.java b/src/main/java/org/gitlab4j/api/RepositoryFileApi.java index e20695d7..19795c9f 100644 --- a/src/main/java/org/gitlab4j/api/RepositoryFileApi.java +++ b/src/main/java/org/gitlab4j/api/RepositoryFileApi.java @@ -136,7 +136,7 @@ public class RepositoryFileApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #getFile(Object, String, String)} */ @Deprecated - public RepositoryFile getFile(String filePath, Integer projectId, String ref) throws GitLabApiException { + public RepositoryFile getFile(String filePath, Long projectId, String ref) throws GitLabApiException { if (isApiVersion(ApiVersion.V3)) { return (getFileV3(filePath, projectId, ref)); @@ -184,7 +184,7 @@ public class RepositoryFileApi extends AbstractApi { * @deprecated Will be removed in version 5.0 */ @Deprecated - protected RepositoryFile getFileV3(String filePath, Integer projectId, String ref) throws GitLabApiException { + protected RepositoryFile getFileV3(String filePath, Long projectId, String ref) throws GitLabApiException { Form form = new Form(); addFormParam(form, "file_path", filePath, true); addFormParam(form, "ref", ref, true); @@ -245,7 +245,7 @@ public class RepositoryFileApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #createFile(Object, RepositoryFile, String, String)} */ @Deprecated - public RepositoryFile createFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { + public RepositoryFile createFile(RepositoryFile file, Long projectId, String branchName, String commitMessage) throws GitLabApiException { return (createFile(projectId, file, branchName, commitMessage)); } @@ -302,7 +302,7 @@ public class RepositoryFileApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #updateFile(Object, RepositoryFile, String, String)} */ @Deprecated - public RepositoryFile updateFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { + public RepositoryFile updateFile(RepositoryFile file, Long projectId, String branchName, String commitMessage) throws GitLabApiException { return (updateFile(projectId, file, branchName, commitMessage)); } @@ -358,7 +358,7 @@ public class RepositoryFileApi extends AbstractApi { * @deprecated Will be removed in version 5.0, replaced by {@link #deleteFile(Object, String, String, String)} */ @Deprecated - public void deleteFile(String filePath, Integer projectId, String branchName, String commitMessage) throws GitLabApiException { + public void deleteFile(String filePath, Long projectId, String branchName, String commitMessage) throws GitLabApiException { deleteFile(projectId, filePath, branchName, commitMessage); } @@ -372,7 +372,7 @@ public class RepositoryFileApi extends AbstractApi { * V4: *
GitLab Endpoint: GET /projects/:id/repository/files/:filepath
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param commitOrBranchName the commit or branch name to get the file for * @param filepath the path of the file to get * @param directory the File instance of the directory to save the file to, if null will use "java.io.tmpdir" @@ -414,7 +414,7 @@ public class RepositoryFileApi extends AbstractApi { * V4: *
GitLab Endpoint: GET /projects/:id/repository/files/:filepath
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param ref the commit or branch name to get the file contents for * @param filepath the path of the file to get * @return an InputStream to read the raw file from @@ -471,7 +471,7 @@ public class RepositoryFileApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path of the file to get the blame for * @param ref the name of branch, tag or commit * @return a List of Blame instances for the specified filePath and ref @@ -487,7 +487,7 @@ public class RepositoryFileApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path of the file to get the blame for * @param ref the name of branch, tag or commit * @param itemsPerPage the number of Project instances that will be fetched per page @@ -506,7 +506,7 @@ public class RepositoryFileApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param filePath the path of the file to get the blame for * @param ref the name of branch, tag or commit * @return a Stream of Blame instances for the specified filePath and ref diff --git a/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java b/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java index 5e7b2bfc..469c0baa 100644 --- a/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java +++ b/src/main/java/org/gitlab4j/api/ResourceLabelEventsApi.java @@ -29,7 +29,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a List of LabelEvent for the specified issue * @throws GitLabApiException if any exception occurs */ - public List getIssueLabelEvents(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueLabelEvents(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueLabelEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -44,7 +44,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return the Pager of LabelEvent instances for the specified issue IID * @throws GitLabApiException if any exception occurs */ - public Pager getIssueLabelEvents(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getIssueLabelEvents(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, LabelEvent.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_label_events")); } @@ -59,7 +59,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a Stream of LabelEvent for the specified issue * @throws GitLabApiException if any exception occurs */ - public Stream getIssueLabelEventsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getIssueLabelEventsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueLabelEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } @@ -74,7 +74,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return LabelEvent instance for the specified project issue * @throws GitLabApiException if any exception occurs */ - public LabelEvent getIssueLabelEvent(Object projectIdOrPath, Integer issueIid, Integer resourceLabelEventId) throws GitLabApiException { + public LabelEvent getIssueLabelEvent(Object projectIdOrPath, Long issueIid, Long resourceLabelEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_label_events", resourceLabelEventId); return (response.readEntity(LabelEvent.class)); @@ -92,7 +92,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public Optional getOptionalIssueLabelEvent(Object projectIdOrPath, - Integer issueIid, Integer resourceLabelEventId) throws GitLabApiException { + Long issueIid, Long resourceLabelEventId) throws GitLabApiException { try { return (Optional.ofNullable(getIssueLabelEvent(projectIdOrPath, issueIid, resourceLabelEventId))); @@ -111,7 +111,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a List of LabelEvent for the specified epic * @throws GitLabApiException if any exception occurs */ - public List getEpicLabelEvents(Object projectIdOrPath, Integer epicId) throws GitLabApiException { + public List getEpicLabelEvents(Object projectIdOrPath, Long epicId) throws GitLabApiException { return (getEpicLabelEvents(projectIdOrPath, epicId, getDefaultPerPage()).all()); } @@ -126,7 +126,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return the Pager of LabelEvent instances for the specified epic * @throws GitLabApiException if any exception occurs */ - public Pager getEpicLabelEvents(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException { + public Pager getEpicLabelEvents(Object projectIdOrPath, Long epicId, int itemsPerPage) throws GitLabApiException { return (new Pager(this, LabelEvent.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "resource_label_events")); } @@ -141,7 +141,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a Stream of LabelEvent for the specified epic * @throws GitLabApiException if any exception occurs */ - public Stream getEpicLabelEventsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException { + public Stream getEpicLabelEventsStream(Object projectIdOrPath, Long epicId) throws GitLabApiException { return (getEpicLabelEvents(projectIdOrPath, epicId, getDefaultPerPage()).stream()); } @@ -156,7 +156,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return LabelEvent instance for the specified epic label event * @throws GitLabApiException if any exception occurs */ - public LabelEvent getEpicLabelEvent(Object projectIdOrPath, Integer epicId, Integer resourceLabelEventId) throws GitLabApiException { + public LabelEvent getEpicLabelEvent(Object projectIdOrPath, Long epicId, Long resourceLabelEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "resource_label_events", resourceLabelEventId); return (response.readEntity(LabelEvent.class)); @@ -174,7 +174,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public Optional getOptionalEpicLabelEvent(Object projectIdOrPath, - Integer epicId, Integer resourceLabelEventId) throws GitLabApiException { + Long epicId, Long resourceLabelEventId) throws GitLabApiException { try { return (Optional.ofNullable(getEpicLabelEvent(projectIdOrPath, epicId, resourceLabelEventId))); @@ -193,7 +193,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a List of LabelEvent for the specified merge request * @throws GitLabApiException if any exception occurs */ - public List getMergeRequestLabelEvents(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public List getMergeRequestLabelEvents(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestLabelEvents(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); } @@ -208,7 +208,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return the Pager of LabelEvent instances for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Pager getMergeRequestLabelEvents(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { + public Pager getMergeRequestLabelEvents(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, LabelEvent.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "resource_label_events")); } @@ -223,7 +223,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return a Stream of LabelEvent for the specified merge request * @throws GitLabApiException if any exception occurs */ - public Stream getMergeRequestLabelEventsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { + public Stream getMergeRequestLabelEventsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException { return (getMergeRequestLabelEvents(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } @@ -238,7 +238,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @return LabelEvent instance for the specified epic label event * @throws GitLabApiException if any exception occurs */ - public LabelEvent getMergeRequestLabelEvent(Object projectIdOrPath, Integer mergeRequestIid, Integer resourceLabelEventId) throws GitLabApiException { + public LabelEvent getMergeRequestLabelEvent(Object projectIdOrPath, Long mergeRequestIid, Long resourceLabelEventId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "resource_label_events", resourceLabelEventId); return (response.readEntity(LabelEvent.class)); @@ -256,7 +256,7 @@ public class ResourceLabelEventsApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public Optional getOptionalMergeRequestLabelEvent(Object projectIdOrPath, - Integer mergeRequestIid, Integer resourceLabelEventId) throws GitLabApiException { + Long mergeRequestIid, Long resourceLabelEventId) throws GitLabApiException { try { return (Optional.ofNullable(getMergeRequestLabelEvent(projectIdOrPath, mergeRequestIid, resourceLabelEventId))); diff --git a/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java b/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java index ff4c42a5..4b9e4873 100644 --- a/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java +++ b/src/main/java/org/gitlab4j/api/ResourceStateEventsApi.java @@ -1,13 +1,10 @@ package org.gitlab4j.api; -import org.gitlab4j.api.models.IssueEvent; -import org.gitlab4j.api.models.LabelEvent; - -import javax.ws.rs.core.Response; import java.util.List; -import java.util.Optional; import java.util.stream.Stream; +import org.gitlab4j.api.models.IssueEvent; + /** * This class provides an entry point to all the GitLab Resource state events API @@ -29,7 +26,7 @@ public class ResourceStateEventsApi extends AbstractApi { * @return a List of IssueEvent for the specified issue * @throws GitLabApiException if any exception occurs */ - public List getIssueStateEvents(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public List getIssueStateEvents(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all()); } @@ -44,7 +41,7 @@ public class ResourceStateEventsApi extends AbstractApi { * @return the Pager of IssueEvent instances for the specified issue IID * @throws GitLabApiException if any exception occurs */ - public Pager getIssueStateEvents(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { + public Pager getIssueStateEvents(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException { return (new Pager(this, IssueEvent.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_state_events")); } @@ -59,7 +56,7 @@ public class ResourceStateEventsApi extends AbstractApi { * @return a Stream of IssueEvent for the specified issue * @throws GitLabApiException if any exception occurs */ - public Stream getIssueStateEventsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { + public Stream getIssueStateEventsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException { return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); } } diff --git a/src/main/java/org/gitlab4j/api/RunnersApi.java b/src/main/java/org/gitlab4j/api/RunnersApi.java index 89af2424..73f00b3c 100644 --- a/src/main/java/org/gitlab4j/api/RunnersApi.java +++ b/src/main/java/org/gitlab4j/api/RunnersApi.java @@ -265,7 +265,7 @@ public class RunnersApi extends AbstractApi { * @return RunnerDetail instance. * @throws GitLabApiException if any exception occurs */ - public RunnerDetail getRunnerDetail(Integer runnerId) throws GitLabApiException { + public RunnerDetail getRunnerDetail(Long runnerId) throws GitLabApiException { if (runnerId == null) { throw new RuntimeException("runnerId cannot be null"); @@ -290,7 +290,7 @@ public class RunnersApi extends AbstractApi { * @return RunnerDetail instance. * @throws GitLabApiException if any exception occurs */ - public RunnerDetail updateRunner(Integer runnerId, String description, Boolean active, List tagList, + public RunnerDetail updateRunner(Long runnerId, String description, Boolean active, List tagList, Boolean runUntagged, Boolean locked, RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException { if (runnerId == null) { throw new RuntimeException("runnerId cannot be null"); @@ -315,7 +315,7 @@ public class RunnersApi extends AbstractApi { * @param runnerId The ID of a runner * @throws GitLabApiException if any exception occurs */ - public void removeRunner(Integer runnerId) throws GitLabApiException { + public void removeRunner(Long runnerId) throws GitLabApiException { if (runnerId == null) { throw new RuntimeException("runnerId cannot be null"); @@ -333,7 +333,7 @@ public class RunnersApi extends AbstractApi { * @return List jobs that are being processed or were processed by specified Runner * @throws GitLabApiException if any exception occurs */ - public List getJobs(Integer runnerId) throws GitLabApiException { + public List getJobs(Long runnerId) throws GitLabApiException { return (getJobs(runnerId, null, getDefaultPerPage()).all()); } @@ -346,7 +346,7 @@ public class RunnersApi extends AbstractApi { * @return a Stream of jobs that are being processed or were processed by specified Runner * @throws GitLabApiException if any exception occurs */ - public Stream getJobsStream(Integer runnerId) throws GitLabApiException { + public Stream getJobsStream(Long runnerId) throws GitLabApiException { return (getJobs(runnerId, null, getDefaultPerPage()).stream()); } @@ -360,7 +360,7 @@ public class RunnersApi extends AbstractApi { * @return List jobs that are being processed or were processed by specified Runner * @throws GitLabApiException if any exception occurs */ - public List getJobs(Integer runnerId, JobStatus status) throws GitLabApiException { + public List getJobs(Long runnerId, JobStatus status) throws GitLabApiException { return (getJobs(runnerId, status, getDefaultPerPage()).all()); } @@ -374,7 +374,7 @@ public class RunnersApi extends AbstractApi { * @return a Stream of jobs that are being processed or were processed by specified Runner * @throws GitLabApiException if any exception occurs */ - public Stream getJobsStream(Integer runnerId, JobStatus status) throws GitLabApiException { + public Stream getJobsStream(Long runnerId, JobStatus status) throws GitLabApiException { return (getJobs(runnerId, status, getDefaultPerPage()).stream()); } @@ -388,7 +388,7 @@ public class RunnersApi extends AbstractApi { * @return a Pager containing the Jobs for the Runner * @throws GitLabApiException if any exception occurs */ - public Pager getJobs(Integer runnerId, int itemsPerPage) throws GitLabApiException { + public Pager getJobs(Long runnerId, int itemsPerPage) throws GitLabApiException { return (getJobs(runnerId, null, itemsPerPage)); } @@ -403,7 +403,7 @@ public class RunnersApi extends AbstractApi { * @return a Pager containing the Jobs for the Runner * @throws GitLabApiException if any exception occurs */ - public Pager getJobs(Integer runnerId, JobStatus status, int itemsPerPage) throws GitLabApiException { + public Pager getJobs(Long runnerId, JobStatus status, int itemsPerPage) throws GitLabApiException { if (runnerId == null) { throw new RuntimeException("runnerId cannot be null"); @@ -419,7 +419,7 @@ public class RunnersApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/runners
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return List of all Runner available in the project * @throws GitLabApiException if any exception occurs */ @@ -433,7 +433,7 @@ public class RunnersApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/runners
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Stream of all Runner available in the project * @throws GitLabApiException if any exception occurs */ @@ -447,7 +447,7 @@ public class RunnersApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/runners
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of Project instances that will be fetched per page * @return Pager of all Runner available in the project * @throws GitLabApiException if any exception occurs @@ -462,12 +462,12 @@ public class RunnersApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/runners
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param runnerId The ID of a runner * @return Runner instance of the Runner enabled * @throws GitLabApiException if any exception occurs */ - public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException { + public Runner enableRunner(Object projectIdOrPath, Long runnerId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true); Response response = post(Response.Status.CREATED, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "runners"); @@ -480,12 +480,12 @@ public class RunnersApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/runners/:runner_id
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param runnerId The ID of a runner * @return Runner instance of the Runner disabled * @throws GitLabApiException if any exception occurs */ - public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException { + public Runner disableRunner(Object projectIdOrPath, Long runnerId) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "runners", runnerId); return (response.readEntity(Runner.class)); diff --git a/src/main/java/org/gitlab4j/api/SearchApi.java b/src/main/java/org/gitlab4j/api/SearchApi.java index 4c65ce12..ac92fd90 100644 --- a/src/main/java/org/gitlab4j/api/SearchApi.java +++ b/src/main/java/org/gitlab4j/api/SearchApi.java @@ -199,7 +199,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query @@ -217,7 +217,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query @@ -237,7 +237,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query @@ -255,7 +255,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query @@ -276,7 +276,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query @@ -296,7 +296,7 @@ public class SearchApi extends AbstractApi { * *
GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query&ref=ref
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param scope search the expression within the specified scope. Currently these scopes are supported: * issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users * @param search the search query diff --git a/src/main/java/org/gitlab4j/api/SnippetsApi.java b/src/main/java/org/gitlab4j/api/SnippetsApi.java index 52c5a705..706e6867 100644 --- a/src/main/java/org/gitlab4j/api/SnippetsApi.java +++ b/src/main/java/org/gitlab4j/api/SnippetsApi.java @@ -88,7 +88,7 @@ public class SnippetsApi extends AbstractApi { * @return the content of snippet * @throws GitLabApiException if any exception occurs */ - public String getSnippetContent(Integer snippetId) throws GitLabApiException { + public String getSnippetContent(Long snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "snippets", snippetId, "raw"); return (response.readEntity(String.class)); } @@ -101,7 +101,7 @@ public class SnippetsApi extends AbstractApi { * @return the snippet with the given id * @throws GitLabApiException if any exception occurs */ - public Snippet getSnippet(Integer snippetId, boolean downloadContent) throws GitLabApiException { + public Snippet getSnippet(Long snippetId, boolean downloadContent) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); @@ -124,7 +124,7 @@ public class SnippetsApi extends AbstractApi { * @return the snippet with the given id * @throws GitLabApiException if any exception occurs */ - public Snippet getSnippet(Integer snippetId) throws GitLabApiException { + public Snippet getSnippet(Long snippetId) throws GitLabApiException { return getSnippet(snippetId, false); } @@ -136,7 +136,7 @@ public class SnippetsApi extends AbstractApi { * @param snippetId the ID of the snippet to get the Optional instance for * @return the specified Snippet as an Optional instance */ - public Optional getOptionalSnippet(Integer snippetId) { + public Optional getOptionalSnippet(Long snippetId) { return (getOptionalSnippet(snippetId, false)); } @@ -149,7 +149,7 @@ public class SnippetsApi extends AbstractApi { * @param downloadContent indicating whether to download the snippet content * @return the specified Snippet as an Optional instance */ - public Optional getOptionalSnippet(Integer snippetId, boolean downloadContent) { + public Optional getOptionalSnippet(Long snippetId, boolean downloadContent) { try { return (Optional.ofNullable(getSnippet(snippetId, downloadContent))); } catch (GitLabApiException glae) { @@ -205,7 +205,7 @@ public class SnippetsApi extends AbstractApi { * @param snippetId the snippet ID to remove * @throws GitLabApiException if any exception occurs */ - public void deleteSnippet(Integer snippetId) throws GitLabApiException { + public void deleteSnippet(Long snippetId) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); diff --git a/src/main/java/org/gitlab4j/api/SystemHooksApi.java b/src/main/java/org/gitlab4j/api/SystemHooksApi.java index 7a1b6a6c..b6f41f9d 100644 --- a/src/main/java/org/gitlab4j/api/SystemHooksApi.java +++ b/src/main/java/org/gitlab4j/api/SystemHooksApi.java @@ -31,7 +31,7 @@ public class SystemHooksApi extends AbstractApi { } /** - * Get a list of all system hooks using the specified page and per page settings. + * Get a list of all system hooks using the specified page and per page settings. * This method requires admin access. * *
GitLab Endpoint: GET /hooks
@@ -148,7 +148,7 @@ public class SystemHooksApi extends AbstractApi { * @param hookId the ID of the system hook to delete * @throws GitLabApiException if any exception occurs */ - public void deleteSystemHook(Integer hookId) throws GitLabApiException { + public void deleteSystemHook(Long hookId) throws GitLabApiException { if (hookId == null) { throw new RuntimeException("hookId cannot be null"); @@ -183,7 +183,7 @@ public class SystemHooksApi extends AbstractApi { * @param hookId the ID of the system hook to test * @throws GitLabApiException if any exception occurs */ - public void testSystemHook(Integer hookId) throws GitLabApiException { + public void testSystemHook(Long hookId) throws GitLabApiException { if (hookId == null) { throw new RuntimeException("hookId cannot be null"); diff --git a/src/main/java/org/gitlab4j/api/TodosApi.java b/src/main/java/org/gitlab4j/api/TodosApi.java index 2e715b3b..204b66cc 100644 --- a/src/main/java/org/gitlab4j/api/TodosApi.java +++ b/src/main/java/org/gitlab4j/api/TodosApi.java @@ -104,7 +104,7 @@ public class TodosApi extends AbstractApi { * @return Stream of Todo instances * @throws GitLabApiException if any exception occurs */ - public List getTodos(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type) throws GitLabApiException { + public List getTodos(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type) throws GitLabApiException { return (getTodos(action, authorId, projectId, groupId, state, type, getDefaultPerPage()).all()); } @@ -122,7 +122,7 @@ public class TodosApi extends AbstractApi { * @return Stream of Todo instances * @throws GitLabApiException if any exception occurs */ - public Stream getTodosStream(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type) throws GitLabApiException { + public Stream getTodosStream(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type) throws GitLabApiException { return (getTodos(action, authorId, projectId, groupId, state, type, getDefaultPerPage()).stream()); } @@ -143,7 +143,7 @@ public class TodosApi extends AbstractApi { * @return a list of pages in todo for the specified range * @throws GitLabApiException if any exception occurs */ - public Pager getTodos(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type, int itemsPerPage) throws GitLabApiException { + public Pager getTodos(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("action", action, false) .withParam("author_id", authorId, false) @@ -164,7 +164,7 @@ public class TodosApi extends AbstractApi { * @return todo instance with info on the created page * @throws GitLabApiException if any exception occurs */ - public Todo markAsDone(Integer todoId) throws GitLabApiException { + public Todo markAsDone(Long todoId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm(); Response response = post(Response.Status.OK, formData, "todos", todoId, "mark_as_done"); return (response.readEntity(Todo.class)); diff --git a/src/main/java/org/gitlab4j/api/UserApi.java b/src/main/java/org/gitlab4j/api/UserApi.java index 69cf71af..837cb101 100644 --- a/src/main/java/org/gitlab4j/api/UserApi.java +++ b/src/main/java/org/gitlab4j/api/UserApi.java @@ -177,7 +177,7 @@ public class UserApi extends AbstractApi { * @param userId the ID of the user to block * @throws GitLabApiException if any exception occurs */ - public void blockUser(Integer userId) throws GitLabApiException { + public void blockUser(Long userId) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); } @@ -197,7 +197,7 @@ public class UserApi extends AbstractApi { * @param userId the ID of the user to unblock * @throws GitLabApiException if any exception occurs */ - public void unblockUser(Integer userId) throws GitLabApiException { + public void unblockUser(Long userId) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); @@ -276,7 +276,7 @@ public class UserApi extends AbstractApi { * @return the User instance for the specified user ID * @throws GitLabApiException if any exception occurs */ - public User getUser(Integer userId) throws GitLabApiException { + public User getUser(Long userId) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("with_custom_attributes", customAttributesEnabled); Response response = get(Response.Status.OK, formData.asMap(), "users", userId); return (response.readEntity(User.class)); @@ -290,7 +290,7 @@ public class UserApi extends AbstractApi { * @param userId the ID of the user to get * @return the User for the specified user ID as an Optional instance */ - public Optional getOptionalUser(Integer userId) { + public Optional getOptionalUser(Long userId) { try { return (Optional.ofNullable(getUser(userId))); } catch (GitLabApiException glae) { @@ -638,7 +638,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /users/:id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @throws GitLabApiException if any exception occurs */ public void deleteUser(Object userIdOrUsername) throws GitLabApiException { @@ -650,7 +650,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /users/:id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param hardDelete If true, contributions that would usually be moved to the * ghost user will be deleted instead, as well as groups owned solely by this user * @throws GitLabApiException if any exception occurs @@ -696,7 +696,7 @@ public class UserApi extends AbstractApi { * @return a list of a specified user's SSH keys * @throws GitLabApiException if any exception occurs */ - public List getSshKeys(Integer userId) throws GitLabApiException { + public List getSshKeys(Long userId) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); @@ -721,7 +721,7 @@ public class UserApi extends AbstractApi { * @return an SshKey instance holding the info on the SSH key specified by keyId * @throws GitLabApiException if any exception occurs */ - public SshKey getSshKey(Integer keyId) throws GitLabApiException { + public SshKey getSshKey(Long keyId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "user", "keys", keyId); return (response.readEntity(SshKey.class)); } @@ -734,7 +734,7 @@ public class UserApi extends AbstractApi { * @param keyId the ID of the SSH key * @return an SshKey as an Optional instance holding the info on the SSH key specified by keyId */ - public Optional getOptionalSshKey(Integer keyId) { + public Optional getOptionalSshKey(Long keyId) { try { return (Optional.ofNullable(getSshKey(keyId))); } catch (GitLabApiException glae) { @@ -769,7 +769,7 @@ public class UserApi extends AbstractApi { * @return an SshKey instance with info on the added SSH key * @throws GitLabApiException if any exception occurs */ - public SshKey addSshKey(Integer userId, String title, String key) throws GitLabApiException { + public SshKey addSshKey(Long userId, String title, String key) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); @@ -794,7 +794,7 @@ public class UserApi extends AbstractApi { * @param keyId the key ID to delete * @throws GitLabApiException if any exception occurs */ - public void deleteSshKey(Integer keyId) throws GitLabApiException { + public void deleteSshKey(Long keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); @@ -809,11 +809,11 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /users/:id/keys/:key_id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param keyId the key ID to delete * @throws GitLabApiException if any exception occurs */ - public void deleteSshKey(Object userIdOrUsername, Integer keyId) throws GitLabApiException { + public void deleteSshKey(Object userIdOrUsername, Long keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); @@ -828,7 +828,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /users/:id/impersonation_tokens
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @return a list of a specified user's impersonation tokens * @throws GitLabApiException if any exception occurs */ @@ -841,7 +841,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /users/:id/impersonation_tokens
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param state the state of impersonation tokens to list (ALL, ACTIVE, INACTIVE) * @return a list of a specified user's impersonation tokens * @throws GitLabApiException if any exception occurs @@ -859,12 +859,12 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param tokenId the impersonation token ID to get * @return the specified impersonation token * @throws GitLabApiException if any exception occurs */ - public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { + public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Long tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); @@ -879,11 +879,11 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param tokenId the impersonation token ID to get * @return the specified impersonation token as an Optional instance */ - public Optional getOptionalImpersonationToken(Object userIdOrUsername, Integer tokenId) { + public Optional getOptionalImpersonationToken(Object userIdOrUsername, Long tokenId) { try { return (Optional.ofNullable(getImpersonationToken(userIdOrUsername, tokenId))); } catch (GitLabApiException glae) { @@ -896,7 +896,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: POST /users/:user_id/impersonation_tokens
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param name the name of the impersonation token, required * @param expiresAt the expiration date of the impersonation token, optional * @param scopes an array of scopes of the impersonation token @@ -926,11 +926,11 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param tokenId the impersonation token ID to revoke * @throws GitLabApiException if any exception occurs */ - public void revokeImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { + public void revokeImpersonationToken(Object userIdOrUsername, Long tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); @@ -988,7 +988,7 @@ public class UserApi extends AbstractApi { /** * Creates custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param customAttribute the custom attribute to set * @return the created CustomAttribute * @throws GitLabApiException on failure while setting customAttributes @@ -1003,7 +1003,7 @@ public class UserApi extends AbstractApi { /** * Creates custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param key for the customAttribute * @param value or the customAttribute * @return the created CustomAttribute @@ -1027,7 +1027,7 @@ public class UserApi extends AbstractApi { /** * Change custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param customAttribute the custome attribute to change * @return the changed CustomAttribute * @throws GitLabApiException on failure while changing customAttributes @@ -1046,7 +1046,7 @@ public class UserApi extends AbstractApi { /** * Changes custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param key for the customAttribute * @param value for the customAttribute * @return changedCustomAttribute @@ -1059,7 +1059,7 @@ public class UserApi extends AbstractApi { /** * Delete a custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param customAttribute to remove * @throws GitLabApiException on failure while deleting customAttributes */ @@ -1074,7 +1074,7 @@ public class UserApi extends AbstractApi { /** * Delete a custom attribute for the given user * - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param key of the customAttribute to remove * @throws GitLabApiException on failure while deleting customAttributes */ @@ -1104,7 +1104,7 @@ public class UserApi extends AbstractApi { * *
PUT /users/:id
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param avatarFile the File instance of the avatar file to upload * @return the updated User instance * @throws GitLabApiException if any exception occurs @@ -1132,7 +1132,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /user/:id/emails
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @return a List of Email instances for the specified user * @throws GitLabApiException if any exception occurs */ @@ -1175,7 +1175,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: POST /user/:id/emails
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param email the email address to add * @param skipConfirmation skip confirmation and assume e-mail is verified - true or false (default) * @return the Email instance for the added email @@ -1207,7 +1207,7 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /user/:id/emails/:emailId
* - * @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance + * @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance * @param emailId the email ID to delete * @throws GitLabApiException if any exception occurs */ @@ -1247,10 +1247,10 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /user/gpg_keys/:keyId
* - * @param keyId the key ID in the form if an Integer(ID) + * @param keyId the key ID in the form if an Long(ID) * @throws GitLabApiException if any exception occurs */ - public void deleteGpgKey(final Integer keyId) throws GitLabApiException { + public void deleteGpgKey(final Long keyId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "user", "gpg_keys", keyId); } @@ -1259,10 +1259,10 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: GET /users/:id/gpg_keys
* - * @param userId the user in the form of an Integer(ID) + * @param userId the user in the form of an Long(ID) * @throws GitLabApiException if any exception occurs */ - public List listGpgKeys(final Integer userId) throws GitLabApiException { + public List listGpgKeys(final Long userId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "users", userId, "gpg_keys"); return (response.readEntity(new GenericType>() {})); } @@ -1272,11 +1272,11 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: POST /users/:id/gpg_keys
* - * @param userId the user in the form of an Integer(ID) + * @param userId the user in the form of an Long(ID) * @param key the ASCII-armored exported public GPG key to add * @throws GitLabApiException if any exception occurs */ - public GpgKey addGpgKey(final Integer userId, final String key) throws GitLabApiException { + public GpgKey addGpgKey(final Long userId, final String key) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("key", key, true); Response response = post(Response.Status.CREATED, formData, "users", userId, "gpg_keys"); @@ -1288,11 +1288,11 @@ public class UserApi extends AbstractApi { * *
GitLab Endpoint: DELETE /users/:id/gpg_keys/:keyId
* - * @param userId the user in the form of an Integer(ID) - * @param keyId the key ID in the form if an Integer(ID) + * @param userId the user in the form of an Long(ID) + * @param keyId the key ID in the form if an Long(ID) * @throws GitLabApiException if any exception occurs */ - public void deleteGpgKey(final Integer userId, final Integer keyId) throws GitLabApiException { + public void deleteGpgKey(final Long userId, final Long keyId) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "users", userId, "gpg_keys", keyId); } @@ -1306,7 +1306,7 @@ public class UserApi extends AbstractApi { * @throws GitLabApiException if any exception occurs * @since GitLab 12.8 */ - public List getMemberships(int userId) throws GitLabApiException { + public List getMemberships(Long userId) throws GitLabApiException { return getMemberships(userId, getDefaultPerPage()).all(); } @@ -1323,7 +1323,7 @@ public class UserApi extends AbstractApi { * @throws GitLabApiException if any exception occurs * @since GitLab 12.8 */ - public Pager getMemberships(int userId, int itemsPerPage) throws GitLabApiException { + public Pager getMemberships(Long userId, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm(); return (new Pager<>(this, Membership.class, itemsPerPage, formData.asMap(), "users", userId, "memberships")); } diff --git a/src/main/java/org/gitlab4j/api/WikisApi.java b/src/main/java/org/gitlab4j/api/WikisApi.java index 10f2c9f2..df230935 100644 --- a/src/main/java/org/gitlab4j/api/WikisApi.java +++ b/src/main/java/org/gitlab4j/api/WikisApi.java @@ -51,7 +51,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a list of pages in the project's wiki * @throws GitLabApiException if any exception occurs */ @@ -64,7 +64,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param itemsPerPage the number of WikiPage instances that will be fetched per page * @return a Pager of pages in project's wiki for the specified range * @throws GitLabApiException if any exception occurs @@ -78,7 +78,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @return a Pager of pages in project's wiki for the specified range * @throws GitLabApiException if any exception occurs */ @@ -91,7 +91,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param page the page to get * @param perPage the number of wiki-pages per page * @return a list of pages in project's wiki for the specified range @@ -109,7 +109,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param withContent if true the results will include the pages content * @return a List of pages in project's wiki for the specified range * @throws GitLabApiException if any exception occurs @@ -123,7 +123,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param withContent if true the results will include the pages content * @param itemsPerPage the number of WikiPage instances that will be fetched per page * @return a Pager of pages in project's wiki for the specified range @@ -140,7 +140,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param withContent if true the results will include the pages content * @return a Stream of pages in project's wiki for the specified range * @throws GitLabApiException if any exception occurs @@ -154,7 +154,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis/:slug
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param slug the slug of the project's wiki page * @return the specified project Snippet * @throws GitLabApiException if any exception occurs @@ -170,7 +170,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: GET /projects/:id/wikis/:slug
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param slug the slug of the project's wiki page * @return the specified project Snippet as an Optional instance */ @@ -187,7 +187,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: POST /projects/:id/wikis
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param title the title of a snippet, required * @param content the content of a wiki page, required * @return a WikiPage instance with info on the created page @@ -209,7 +209,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: PUT /projects/:id/wikis/:slug
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param slug the slug of the project's wiki page, required * @param title the title of a snippet, optional * @param content the content of a page, optional. Either title or content must be supplied. @@ -233,7 +233,7 @@ public class WikisApi extends AbstractApi { * *
GitLab Endpoint: DELETE /projects/:id/wikis/:slug
* - * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance + * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param slug the slug of the project's wiki page * @throws GitLabApiException if any exception occurs */ @@ -246,7 +246,7 @@ public class WikisApi extends AbstractApi { * *
POST /projects/:id/wikis/attachments
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param fileToUpload the File instance of the file to upload, required * @return a FileUpload instance with information on the just uploaded file * @throws GitLabApiException if any exception occurs @@ -260,7 +260,7 @@ public class WikisApi extends AbstractApi { * *
POST /projects/:id/wikis/attachments
* - * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required + * @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required * @param fileToUpload the File instance of the file to upload, required * @param branch the name of the branch, defaults to the wiki repository default branch, optional * @return a FileUpload instance with information on the just uploaded file diff --git a/src/main/java/org/gitlab4j/api/models/AbstractUser.java b/src/main/java/org/gitlab4j/api/models/AbstractUser.java index 72dab0ec..8b10d23b 100644 --- a/src/main/java/org/gitlab4j/api/models/AbstractUser.java +++ b/src/main/java/org/gitlab4j/api/models/AbstractUser.java @@ -12,7 +12,7 @@ public abstract class AbstractUser> { private String avatarUrl; private Date createdAt; private String email; - private Integer id; + private Long id; private String name; private String state; private String username; @@ -42,11 +42,11 @@ public abstract class AbstractUser> { this.email = email; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -101,7 +101,7 @@ public abstract class AbstractUser> { } @SuppressWarnings("unchecked") - public U withId(Integer id) { + public U withId(Long id) { this.id = id; return (U)this; } @@ -129,7 +129,7 @@ public abstract class AbstractUser> { this.webUrl = webUrl; return (U)this; } - + @Override public String toString() { return (JacksonJson.toJsonString(this)); diff --git a/src/main/java/org/gitlab4j/api/models/AllowedTo.java b/src/main/java/org/gitlab4j/api/models/AllowedTo.java index f0a98683..a3c01135 100644 --- a/src/main/java/org/gitlab4j/api/models/AllowedTo.java +++ b/src/main/java/org/gitlab4j/api/models/AllowedTo.java @@ -9,10 +9,10 @@ import org.gitlab4j.api.GitLabApiForm; public class AllowedTo { private AccessLevel accessLevel; - private Integer userId; - private Integer groupId; + private Long userId; + private Long groupId; - public AllowedTo(AccessLevel accessLevel, Integer userId, Integer groupId) { + public AllowedTo(AccessLevel accessLevel, Long userId, Long groupId) { this.accessLevel = accessLevel; this.userId = userId; this.groupId = groupId; @@ -23,12 +23,12 @@ public class AllowedTo { return (this); } - public AllowedTo withUserId(Integer userId) { + public AllowedTo withUserId(Long userId) { this.userId = userId; return (this); } - public AllowedTo withGroupId(Integer groupId) { + public AllowedTo withGroupId(Long groupId) { this.groupId = groupId; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/Application.java b/src/main/java/org/gitlab4j/api/models/Application.java index 789c649d..9d70f588 100644 --- a/src/main/java/org/gitlab4j/api/models/Application.java +++ b/src/main/java/org/gitlab4j/api/models/Application.java @@ -2,16 +2,16 @@ package org.gitlab4j.api.models; public class Application { - private Integer id; + private Long id; private String applicationId; private String applicationName; private String callbackUrl; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java b/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java index fd33bb26..62d081bd 100644 --- a/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java +++ b/src/main/java/org/gitlab4j/api/models/ApplicationSettings.java @@ -19,16 +19,16 @@ import com.fasterxml.jackson.databind.node.TextNode; public class ApplicationSettings { - private Integer id; + private Long id; private Date createdAt; private Date updatedAt; private Map settings = new HashMap<>(); - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/ApprovalRule.java b/src/main/java/org/gitlab4j/api/models/ApprovalRule.java index 93b0a821..e1249fdb 100644 --- a/src/main/java/org/gitlab4j/api/models/ApprovalRule.java +++ b/src/main/java/org/gitlab4j/api/models/ApprovalRule.java @@ -6,7 +6,7 @@ import java.util.List; public class ApprovalRule { - private Integer id; + private Long id; private String name; private String ruleType; private List eligibleApprovers; @@ -18,11 +18,11 @@ public class ApprovalRule { private List approvedBy; private Boolean approved; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java b/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java index 680a78cc..59176560 100644 --- a/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java +++ b/src/main/java/org/gitlab4j/api/models/ApprovalRuleParams.java @@ -8,8 +8,8 @@ public class ApprovalRuleParams { private String name; private Integer approvalsRequired; - private List userIds; - private List groupIds; + private List userIds; + private List groupIds; public ApprovalRuleParams withName(String name) { this.name = name; @@ -21,12 +21,12 @@ public class ApprovalRuleParams { return (this); } - public ApprovalRuleParams withUserIds(List userIds) { + public ApprovalRuleParams withUserIds(List userIds) { this.userIds = userIds; return (this); } - public ApprovalRuleParams withGroupIds(List groupIds) { + public ApprovalRuleParams withGroupIds(List groupIds) { this.groupIds = groupIds; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/Assets.java b/src/main/java/org/gitlab4j/api/models/Assets.java index fec11717..60fd81e6 100644 --- a/src/main/java/org/gitlab4j/api/models/Assets.java +++ b/src/main/java/org/gitlab4j/api/models/Assets.java @@ -39,16 +39,16 @@ public class Assets { public static class Link { - private Integer id; + private Long id; private String name; private String url; private Boolean external; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/AuditEvent.java b/src/main/java/org/gitlab4j/api/models/AuditEvent.java index df76e583..2b336ad1 100644 --- a/src/main/java/org/gitlab4j/api/models/AuditEvent.java +++ b/src/main/java/org/gitlab4j/api/models/AuditEvent.java @@ -7,34 +7,34 @@ import org.gitlab4j.api.utils.JacksonJson; public class AuditEvent { - private Integer id; - private Integer authorId; - private Integer entityId; + private Long id; + private Long authorId; + private Long entityId; private String entityType; private AuditEventDetail details; private Date createdAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getAuthorId() { + public Long getAuthorId() { return authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } - public Integer getEntityId() { + public Long getEntityId() { return entityId; } - public void setEntityId(Integer entityId) { + public void setEntityId(Long entityId) { this.entityId = entityId; } diff --git a/src/main/java/org/gitlab4j/api/models/AwardEmoji.java b/src/main/java/org/gitlab4j/api/models/AwardEmoji.java index c4cda2c0..beab5c8b 100644 --- a/src/main/java/org/gitlab4j/api/models/AwardEmoji.java +++ b/src/main/java/org/gitlab4j/api/models/AwardEmoji.java @@ -32,19 +32,19 @@ public class AwardEmoji { } } - private Integer id; + private Long id; private String name; private User user; private Date createdAt; private Date updatedAt; - private Integer awardableId; + private Long awardableId; private AwardableType awardableType; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -80,11 +80,11 @@ public class AwardEmoji { this.updatedAt = updatedAt; } - public Integer getAwardableId() { + public Long getAwardableId() { return awardableId; } - public void setAwardableId(Integer awardableId) { + public void setAwardableId(Long awardableId) { this.awardableId = awardableId; } diff --git a/src/main/java/org/gitlab4j/api/models/Badge.java b/src/main/java/org/gitlab4j/api/models/Badge.java index b4554e52..71c4d24a 100644 --- a/src/main/java/org/gitlab4j/api/models/Badge.java +++ b/src/main/java/org/gitlab4j/api/models/Badge.java @@ -29,7 +29,7 @@ public class Badge { } } - private Integer id; + private Long id; private String name; private String linkUrl; private String imageUrl; @@ -37,11 +37,11 @@ public class Badge { private String renderedImageUrl; private BadgeKind kind; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Board.java b/src/main/java/org/gitlab4j/api/models/Board.java index 28544e44..7ac373d0 100644 --- a/src/main/java/org/gitlab4j/api/models/Board.java +++ b/src/main/java/org/gitlab4j/api/models/Board.java @@ -6,17 +6,17 @@ import org.gitlab4j.api.utils.JacksonJson; public class Board { - private Integer id; + private Long id; private String name; private Project project; private Milestone milestone; private List lists; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/BoardList.java b/src/main/java/org/gitlab4j/api/models/BoardList.java index b8f81121..602aa7e4 100644 --- a/src/main/java/org/gitlab4j/api/models/BoardList.java +++ b/src/main/java/org/gitlab4j/api/models/BoardList.java @@ -4,15 +4,15 @@ import org.gitlab4j.api.utils.JacksonJson; public class BoardList { - private Integer id; + private Long id; private Label label; private Integer position; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java b/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java index f48ff53d..a93b0d9e 100644 --- a/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java +++ b/src/main/java/org/gitlab4j/api/models/BranchAccessLevel.java @@ -6,8 +6,8 @@ public class BranchAccessLevel { private AccessLevel accessLevel; private String accessLevelDescription; - private Integer userId; - private Integer groupId; + private Long userId; + private Long groupId; public AccessLevel getAccessLevel() { return this.accessLevel; @@ -25,19 +25,19 @@ public class BranchAccessLevel { this.accessLevelDescription = accessLevelDescription; } - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } diff --git a/src/main/java/org/gitlab4j/api/models/DeployKey.java b/src/main/java/org/gitlab4j/api/models/DeployKey.java index f33ea8de..b96012f1 100644 --- a/src/main/java/org/gitlab4j/api/models/DeployKey.java +++ b/src/main/java/org/gitlab4j/api/models/DeployKey.java @@ -7,17 +7,17 @@ import org.gitlab4j.api.utils.JacksonJson; public class DeployKey { - private Integer id; + private Long id; private String title; private String key; private Boolean canPush; private Date createdAt; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/DeployToken.java b/src/main/java/org/gitlab4j/api/models/DeployToken.java index 00727097..65c469fb 100644 --- a/src/main/java/org/gitlab4j/api/models/DeployToken.java +++ b/src/main/java/org/gitlab4j/api/models/DeployToken.java @@ -8,18 +8,18 @@ import java.util.List; public class DeployToken { - private Integer id; + private Long id; private String name; private String username; private Date expiresAt; private List scopes; private String token; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Deployable.java b/src/main/java/org/gitlab4j/api/models/Deployable.java index dfae5809..1638b012 100644 --- a/src/main/java/org/gitlab4j/api/models/Deployable.java +++ b/src/main/java/org/gitlab4j/api/models/Deployable.java @@ -8,7 +8,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class Deployable { - private Integer id; + private Long id; private DeploymentStatus status; private String stage; private String name; @@ -27,11 +27,11 @@ public class Deployable { private Runner runner; private Date artifactsExpireAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Deployment.java b/src/main/java/org/gitlab4j/api/models/Deployment.java index 8480e94c..3b477716 100644 --- a/src/main/java/org/gitlab4j/api/models/Deployment.java +++ b/src/main/java/org/gitlab4j/api/models/Deployment.java @@ -7,8 +7,8 @@ import org.gitlab4j.api.utils.JacksonJson; public class Deployment { - private Integer id; - private Integer iid; + private Long id; + private Long iid; private String ref; private String sha; private Date createdAt; @@ -18,19 +18,19 @@ public class Deployment { private Environment environment; private Deployable deployable; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } diff --git a/src/main/java/org/gitlab4j/api/models/Environment.java b/src/main/java/org/gitlab4j/api/models/Environment.java index a6e4ec38..4efa9855 100644 --- a/src/main/java/org/gitlab4j/api/models/Environment.java +++ b/src/main/java/org/gitlab4j/api/models/Environment.java @@ -29,18 +29,18 @@ public class Environment { } } - private Integer id; + private Long id; private String name; private String slug; private String externalUrl; private EnvironmentState state; private Deployment lastDeployment; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Epic.java b/src/main/java/org/gitlab4j/api/models/Epic.java index 4b226f49..fad92e52 100644 --- a/src/main/java/org/gitlab4j/api/models/Epic.java +++ b/src/main/java/org/gitlab4j/api/models/Epic.java @@ -6,10 +6,10 @@ import java.util.List; import org.gitlab4j.api.utils.JacksonJson; public class Epic { - - private Integer id; - private Integer iid; - private Integer groupId; + + private Long id; + private Long iid; + private Long groupId; private String title; private String description; private Author author; @@ -19,27 +19,27 @@ public class Epic { private Date createdAt; private Date updatedAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } @@ -50,7 +50,7 @@ public class Epic { public void setTitle(String title) { this.title = title; } - + public Epic withTitle(String title) { this.title = title; return (this); diff --git a/src/main/java/org/gitlab4j/api/models/EpicIssue.java b/src/main/java/org/gitlab4j/api/models/EpicIssue.java index db4d9922..8883b6f0 100644 --- a/src/main/java/org/gitlab4j/api/models/EpicIssue.java +++ b/src/main/java/org/gitlab4j/api/models/EpicIssue.java @@ -17,22 +17,26 @@ public class EpicIssue extends Issue { private Map links; private Boolean subscribed; - private Integer epicIssueId; + private Long epicIssueId; private Integer relativePosition; - public Integer getDownvotes() { + @Override + public Integer getDownvotes() { return downvotes; } - public void setDownvotes(Integer downvotes) { + @Override + public void setDownvotes(Integer downvotes) { this.downvotes = downvotes; } - public Integer getUpvotes() { + @Override + public Integer getUpvotes() { return upvotes; } - public void setUpvotes(Integer upvotes) { + @Override + public void setUpvotes(Integer upvotes) { this.upvotes = upvotes; } @@ -53,19 +57,21 @@ public class EpicIssue extends Issue { return (links.get(name)); } - public Boolean getSubscribed() { + @Override + public Boolean getSubscribed() { return subscribed; } - public void setSubscribed(Boolean subscribed) { + @Override + public void setSubscribed(Boolean subscribed) { this.subscribed = subscribed; } - public Integer getEpicIssueId() { + public Long getEpicIssueId() { return epicIssueId; } - public void setEpicIssueId(Integer epicIssueId) { + public void setEpicIssueId(Long epicIssueId) { this.epicIssueId = epicIssueId; } diff --git a/src/main/java/org/gitlab4j/api/models/Event.java b/src/main/java/org/gitlab4j/api/models/Event.java index dc9e3a28..8ca23342 100644 --- a/src/main/java/org/gitlab4j/api/models/Event.java +++ b/src/main/java/org/gitlab4j/api/models/Event.java @@ -10,12 +10,12 @@ public class Event { private String actionName; private Author author; - private Integer authorId; + private Long authorId; private String authorUsername; private EventData data; - private Integer projectId; - private Integer targetId; - private Integer targetIid; + private Long projectId; + private Long targetId; + private Long targetIid; private String targetTitle; private TargetType targetType; private String title; @@ -40,11 +40,11 @@ public class Event { this.author = author; } - public Integer getAuthorId() { + public Long getAuthorId() { return authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } @@ -64,27 +64,27 @@ public class Event { this.data = data; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } - public Integer getTargetId() { + public Long getTargetId() { return targetId; } - public void setTargetId(Integer targetId) { + public void setTargetId(Long targetId) { this.targetId = targetId; } - public Integer getTargetIid() { + public Long getTargetIid() { return targetIid; } - public void setTargetIid(Integer targetIid) { + public void setTargetIid(Long targetIid) { this.targetIid = targetIid; } @@ -146,7 +146,7 @@ public class Event { return this; } - public Event withAuthorId(Integer authorId) { + public Event withAuthorId(Long authorId) { this.authorId = authorId; return this; } @@ -161,17 +161,17 @@ public class Event { return this; } - public Event withProjectId(Integer projectId) { + public Event withProjectId(Long projectId) { this.projectId = projectId; return this; } - public Event withTargetId(Integer targetId) { + public Event withTargetId(Long targetId) { this.targetId = targetId; return this; } - public Event withTargetIid(Integer targetIid) { + public Event withTargetIid(Long targetIid) { this.targetIid = targetIid; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/EventData.java b/src/main/java/org/gitlab4j/api/models/EventData.java index 1ba98a98..ecd9ad42 100644 --- a/src/main/java/org/gitlab4j/api/models/EventData.java +++ b/src/main/java/org/gitlab4j/api/models/EventData.java @@ -13,7 +13,7 @@ public class EventData { private String ref; private Repository repository; private Integer totalCommitsCount; - private Integer userId; + private Long userId; private String userName; public String getAfter() { @@ -64,11 +64,11 @@ public class EventData { this.totalCommitsCount = totalCommitsCount; } - public Integer getUserId() { + public Long getUserId() { return this.userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } @@ -111,7 +111,7 @@ public class EventData { return this; } - public EventData withUserId(Integer userId) { + public EventData withUserId(Long userId) { this.userId = userId; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/ExportStatus.java b/src/main/java/org/gitlab4j/api/models/ExportStatus.java index 6efb8927..e9b2af58 100644 --- a/src/main/java/org/gitlab4j/api/models/ExportStatus.java +++ b/src/main/java/org/gitlab4j/api/models/ExportStatus.java @@ -45,7 +45,7 @@ public class ExportStatus { } } - private Integer id; + private Long id; private String description; private String name; private String nameWithNamespace; @@ -57,11 +57,11 @@ public class ExportStatus { @JsonProperty("_links") private Map links; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/GpgKey.java b/src/main/java/org/gitlab4j/api/models/GpgKey.java index bb066ed8..8f364fd8 100644 --- a/src/main/java/org/gitlab4j/api/models/GpgKey.java +++ b/src/main/java/org/gitlab4j/api/models/GpgKey.java @@ -4,15 +4,15 @@ import java.util.Date; public class GpgKey { - private Integer id; + private Long id; private String key; private Date created_at; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/GpgSignature.java b/src/main/java/org/gitlab4j/api/models/GpgSignature.java index 8f13f911..081d4ae9 100644 --- a/src/main/java/org/gitlab4j/api/models/GpgSignature.java +++ b/src/main/java/org/gitlab4j/api/models/GpgSignature.java @@ -4,18 +4,18 @@ import org.gitlab4j.api.utils.JacksonJson; public class GpgSignature { - private Integer gpgKeyId; + private Long gpgKeyId; private String gpgKeyPrimaryKeyid; private String gpgKeyUserName; private String gpgKeyUserEmail; private String verificationStatus; private String gpgKeySubkeyId; - public Integer getGpgKeyId() { + public Long getGpgKeyId() { return gpgKeyId; } - public void setGpgKeyId(Integer gpgKeyId) { + public void setGpgKeyId(Long gpgKeyId) { this.gpgKeyId = gpgKeyId; } diff --git a/src/main/java/org/gitlab4j/api/models/Group.java b/src/main/java/org/gitlab4j/api/models/Group.java index 6615d89c..21209d6d 100644 --- a/src/main/java/org/gitlab4j/api/models/Group.java +++ b/src/main/java/org/gitlab4j/api/models/Group.java @@ -49,7 +49,7 @@ public class Group { } - private Integer id; + private Long id; private String name; private String path; private String description; @@ -60,7 +60,7 @@ public class Group { private Boolean requestAccessEnabled; private String fullName; private String fullPath; - private Integer parentId; + private Long parentId; private Integer sharedRunnersMinutesLimit; private Statistics statistics; private List projects; @@ -71,11 +71,11 @@ public class Group { @JsonSerialize(using = JacksonJson.DateOnlySerializer.class) private Date markedForDeletionOn; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -159,11 +159,11 @@ public class Group { this.fullPath = fullPath; } - public Integer getParentId() { + public Long getParentId() { return parentId; } - public void setParentId(Integer parentId) { + public void setParentId(Long parentId) { this.parentId = parentId; } @@ -223,7 +223,7 @@ public class Group { this.runnersToken = runnersToken; } - public Group withId(Integer id) { + public Group withId(Long id) { this.id = id; return this; } @@ -278,7 +278,7 @@ public class Group { return this; } - public Group withParentId(Integer parentId) { + public Group withParentId(Long parentId) { this.parentId = parentId; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/GroupParams.java b/src/main/java/org/gitlab4j/api/models/GroupParams.java index f5233934..c196f24e 100644 --- a/src/main/java/org/gitlab4j/api/models/GroupParams.java +++ b/src/main/java/org/gitlab4j/api/models/GroupParams.java @@ -58,13 +58,13 @@ public class GroupParams { private Boolean emailsDisabled; private Boolean lfsEnabled; private Boolean requestAccessEnabled; - private Integer parentId; + private Long parentId; private Integer sharedRunnersMinutesLimit; private Integer extraSharedRunnersMinutesLimit; private DefaultBranchProtectionLevel defaultBranchProtection; private Boolean membershipLock; - private Integer fileTemplateProjectId; + private Long fileTemplateProjectId; /** * The parent group ID for creating nested group. For create only. @@ -72,7 +72,7 @@ public class GroupParams { * @param parentId the parent group ID for creating nested group * @return this GroupParms instance */ - public GroupParams withParentId(Integer parentId) { + public GroupParams withParentId(Long parentId) { this.parentId = parentId; return (this); } @@ -94,7 +94,7 @@ public class GroupParams { * @param fileTemplateProjectId the ID of a project to load custom file templates from * @return this GroupParms instance */ - public GroupParams withFileTemplateProjectId(Integer fileTemplateProjectId) { + public GroupParams withFileTemplateProjectId(Long fileTemplateProjectId) { this.fileTemplateProjectId = fileTemplateProjectId; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java b/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java index 4e841aa8..60b35ebb 100644 --- a/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java +++ b/src/main/java/org/gitlab4j/api/models/ImpersonationToken.java @@ -39,7 +39,7 @@ public class ImpersonationToken { private List scopes; private Boolean revoked; private String name; - private Integer id; + private Long id; private Date createdAt; private Boolean impersonation; private Date expiresAt; @@ -84,11 +84,11 @@ public class ImpersonationToken { this.name = name; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/ImportStatus.java b/src/main/java/org/gitlab4j/api/models/ImportStatus.java index 5945456b..dc731e38 100644 --- a/src/main/java/org/gitlab4j/api/models/ImportStatus.java +++ b/src/main/java/org/gitlab4j/api/models/ImportStatus.java @@ -35,7 +35,7 @@ public class ImportStatus { } } - private Integer id; + private Long id; private String description; private String name; private String nameWithNamespace; @@ -45,11 +45,11 @@ public class ImportStatus { private Status importStatus; private String importError; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Issue.java b/src/main/java/org/gitlab4j/api/models/Issue.java index 86a09581..adec9fcb 100644 --- a/src/main/java/org/gitlab4j/api/models/Issue.java +++ b/src/main/java/org/gitlab4j/api/models/Issue.java @@ -9,7 +9,7 @@ import org.gitlab4j.api.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.node.IntNode; +import com.fasterxml.jackson.databind.node.LongNode; import com.fasterxml.jackson.databind.node.TextNode; import com.fasterxml.jackson.databind.node.ValueNode; @@ -58,13 +58,13 @@ public class Issue { @JsonIgnore private String externalId; @JsonIgnore - private Integer id; + private Long id; - private Integer iid; - private Integer issueLinkId; + private Long iid; + private Long issueLinkId; private List labels; private Milestone milestone; - private Integer projectId; + private Long projectId; private IssueState state; private Boolean subscribed; private String title; @@ -145,19 +145,19 @@ public class Issue { actualId = id; if (actualId instanceof TextNode) { externalId = actualId.asText(); - } else if (actualId instanceof IntNode) { - this.id = actualId.asInt(); + } else if (actualId instanceof LongNode) { + this.id = actualId.asLong(); } } - public Integer getId() { + public Long getId() { return (id); } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; if (id != null) { - actualId = new IntNode(id); + actualId = new LongNode(id); externalId = null; } } @@ -174,19 +174,19 @@ public class Issue { } } - public Integer getIid() { + public Long getIid() { return iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } - public Integer getIssueLinkId() { + public Long getIssueLinkId() { return issueLinkId; } - public void setIssueLinkId(Integer issueLinkId) { + public void setIssueLinkId(Long issueLinkId) { this.issueLinkId = issueLinkId; } @@ -206,11 +206,11 @@ public class Issue { this.milestone = milestone; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/models/IssueEvent.java b/src/main/java/org/gitlab4j/api/models/IssueEvent.java index 142621b8..3e8a6a88 100644 --- a/src/main/java/org/gitlab4j/api/models/IssueEvent.java +++ b/src/main/java/org/gitlab4j/api/models/IssueEvent.java @@ -30,18 +30,18 @@ public class IssueEvent { } } - private int id; + private Long id; private User user; private String createdAt; private ResourceType resourceType; - private int resourceId; + private Long resourceId; private String state; - public int getId() { + public Long getId() { return id; } - public void setId(int id) { + public void setId(Long id) { this.id = id; } @@ -69,11 +69,11 @@ public class IssueEvent { this.resourceType = resourceType; } - public int getResourceId() { + public Long getResourceId() { return resourceId; } - public void setResourceId(int resourceId) { + public void setResourceId(Long resourceId) { this.resourceId = resourceId; } diff --git a/src/main/java/org/gitlab4j/api/models/IssueFilter.java b/src/main/java/org/gitlab4j/api/models/IssueFilter.java index e99b16fe..3dac607a 100644 --- a/src/main/java/org/gitlab4j/api/models/IssueFilter.java +++ b/src/main/java/org/gitlab4j/api/models/IssueFilter.java @@ -44,12 +44,12 @@ public class IssueFilter { /** * Return issues created by the given user id. */ - private Integer authorId; + private Long authorId; /** * Return issues assigned to the given user id. */ - private Integer assigneeId; + private Long assigneeId; /** * Return issues reacted by the authenticated user by the given emoji. @@ -133,19 +133,19 @@ public class IssueFilter { this.scope = scope; } - public Integer getAuthorId() { + public Long getAuthorId() { return authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } - public Integer getAssigneeId() { + public Long getAssigneeId() { return assigneeId; } - public void setAssigneeId(Integer assigneeId) { + public void setAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; } @@ -239,12 +239,12 @@ public class IssueFilter { return (this); } - public IssueFilter withAuthorId(Integer authorId) { + public IssueFilter withAuthorId(Long authorId) { this.authorId = authorId; return (this); } - public IssueFilter withAssigneeId(Integer assigneeId) { + public IssueFilter withAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java b/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java index e68870c3..31b60c6c 100644 --- a/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java +++ b/src/main/java/org/gitlab4j/api/models/IssuesStatisticsFilter.java @@ -18,24 +18,24 @@ public class IssuesStatisticsFilter { private List labels; private String milestone; private IssueScope scope; - private Integer authorId; - private Integer assigneeId; + private Long authorId; + private Long assigneeId; private String myReactionEmoji; - private List iids; + private List iids; private String search; private String in; private Date createdAfter; private Date createdBefore; private Date updatedAfter; - private Date updatedBefore; + private Date updatedBefore; private Boolean confidential; public IssuesStatisticsFilter withLabels(List labels) { this.labels = labels; return (this); } - - public IssuesStatisticsFilter withIids(List iids) { + + public IssuesStatisticsFilter withIids(List iids) { this.iids = iids; return (this); } @@ -50,12 +50,12 @@ public class IssuesStatisticsFilter { return (this); } - public IssuesStatisticsFilter withAuthorId(Integer authorId) { + public IssuesStatisticsFilter withAuthorId(Long authorId) { this.authorId = authorId; return (this); } - public IssuesStatisticsFilter withAssigneeId(Integer assigneeId) { + public IssuesStatisticsFilter withAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/Job.java b/src/main/java/org/gitlab4j/api/models/Job.java index 42bf82b0..ecaee41c 100644 --- a/src/main/java/org/gitlab4j/api/models/Job.java +++ b/src/main/java/org/gitlab4j/api/models/Job.java @@ -7,7 +7,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class Job { - private Integer id; + private Long id; private Commit commit; private String coverage; private Date createdAt; @@ -31,11 +31,11 @@ public class Job { private Float duration; private Project project; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -215,7 +215,7 @@ public class Job { this.project = project; } - public Job withId(Integer id) { + public Job withId(Long id) { this.id = id; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/Key.java b/src/main/java/org/gitlab4j/api/models/Key.java index 20b500b6..ed5e406f 100644 --- a/src/main/java/org/gitlab4j/api/models/Key.java +++ b/src/main/java/org/gitlab4j/api/models/Key.java @@ -8,7 +8,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class Key { private Date createdAt; - private Integer id; + private Long id; private String key; private String title; private User user; @@ -21,11 +21,11 @@ public class Key { this.createdAt = createdAt; } - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Label.java b/src/main/java/org/gitlab4j/api/models/Label.java index 39c03ba3..636b5b4e 100644 --- a/src/main/java/org/gitlab4j/api/models/Label.java +++ b/src/main/java/org/gitlab4j/api/models/Label.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; public class Label { - private Integer id; + private Long id; private String name; private String color; private String description; @@ -17,11 +17,11 @@ public class Label { private Boolean subscribed; private Integer priority; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/LabelEvent.java b/src/main/java/org/gitlab4j/api/models/LabelEvent.java index 191dd4c9..3ceae653 100644 --- a/src/main/java/org/gitlab4j/api/models/LabelEvent.java +++ b/src/main/java/org/gitlab4j/api/models/LabelEvent.java @@ -32,19 +32,19 @@ public class LabelEvent { } } - private int id; + private Long id; private User user; private String createdAt; private ResourceType resourceType; - private int resourceId; + private Long resourceId; private Label label; private String action; - public int getId() { + public Long getId() { return id; } - public void setId(int id) { + public void setId(Long id) { this.id = id; } @@ -72,11 +72,11 @@ public class LabelEvent { this.resourceType = resourceType; } - public int getResourceId() { + public Long getResourceId() { return resourceId; } - public void setResourceId(int resourceId) { + public void setResourceId(Long resourceId) { this.resourceId = resourceId; } diff --git a/src/main/java/org/gitlab4j/api/models/License.java b/src/main/java/org/gitlab4j/api/models/License.java index be376296..db2d9a15 100644 --- a/src/main/java/org/gitlab4j/api/models/License.java +++ b/src/main/java/org/gitlab4j/api/models/License.java @@ -7,7 +7,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class License { - private Integer id; + private Long id; private String plan; private Date createdAt; private Date startsAt; @@ -20,11 +20,11 @@ public class License { private Map licensee; private Map addOns; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Membership.java b/src/main/java/org/gitlab4j/api/models/Membership.java index 6175fe4f..c58a8067 100644 --- a/src/main/java/org/gitlab4j/api/models/Membership.java +++ b/src/main/java/org/gitlab4j/api/models/Membership.java @@ -4,16 +4,16 @@ import org.gitlab4j.api.utils.JacksonJson; public class Membership { - private Integer sourceId; + private Long sourceId; private String sourceName; private MembershipSourceType sourceType; private AccessLevel accessLevel; - public Integer getSourceId() { + public Long getSourceId() { return sourceId; } - public void setSourceId(Integer sourceId) { + public void setSourceId(Long sourceId) { this.sourceId = sourceId; } diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequest.java b/src/main/java/org/gitlab4j/api/models/MergeRequest.java index 221b7018..e6439f77 100644 --- a/src/main/java/org/gitlab4j/api/models/MergeRequest.java +++ b/src/main/java/org/gitlab4j/api/models/MergeRequest.java @@ -28,8 +28,8 @@ public class MergeRequest { private Integer downvotes; private Boolean forceRemoveSourceBranch; private Boolean hasConflicts; - private Integer id; - private Integer iid; + private Long id; + private Long iid; private List labels; private Date latestBuildFinishedAt; private Date latestBuildStartedAt; @@ -42,16 +42,16 @@ public class MergeRequest { private String mergeError; private Milestone milestone; private Pipeline pipeline; - private Integer projectId; + private Long projectId; private String sha; private Boolean shouldRemoveSourceBranch; private String sourceBranch; - private Integer sourceProjectId; + private Long sourceProjectId; private Boolean squash; private String state; private Boolean subscribed; private String targetBranch; - private Integer targetProjectId; + private Long targetProjectId; private TaskCompletionStatus taskCompletionStatus; private References references; private TimeStats timeStats; @@ -208,19 +208,19 @@ public class MergeRequest { this.hasConflicts = hasConflicts; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } @@ -320,11 +320,11 @@ public class MergeRequest { this.pipeline = pipeline; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -352,11 +352,11 @@ public class MergeRequest { this.sourceBranch = sourceBranch; } - public Integer getSourceProjectId() { + public Long getSourceProjectId() { return sourceProjectId; } - public void setSourceProjectId(Integer sourceProjectId) { + public void setSourceProjectId(Long sourceProjectId) { this.sourceProjectId = sourceProjectId; } @@ -392,11 +392,11 @@ public class MergeRequest { this.targetBranch = targetBranch; } - public Integer getTargetProjectId() { + public Long getTargetProjectId() { return targetProjectId; } - public void setTargetProjectId(Integer targetProjectId) { + public void setTargetProjectId(Long targetProjectId) { this.targetProjectId = targetProjectId; } diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java b/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java index cd71b009..215a11d2 100644 --- a/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java +++ b/src/main/java/org/gitlab4j/api/models/MergeRequestDiff.java @@ -7,22 +7,22 @@ import org.gitlab4j.api.utils.JacksonJson; public class MergeRequestDiff { - private Integer id; + private Long id; private String headCommitSha; private String baseCommitSha; private String startCommitSha; private Date createdAt; - private Integer mergeRequestId; + private Long mergeRequestId; private String state; private String realSize; private List commits; private List diffs; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -58,11 +58,11 @@ public class MergeRequestDiff { this.createdAt = createdAt; } - public Integer getMergeRequestId() { + public Long getMergeRequestId() { return mergeRequestId; } - public void setMergeRequestId(Integer mergeRequestId) { + public void setMergeRequestId(Long mergeRequestId) { this.mergeRequestId = mergeRequestId; } diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java b/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java index 655b62cd..79b9c7c2 100644 --- a/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java +++ b/src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java @@ -21,8 +21,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; */ public class MergeRequestFilter { - private Integer projectId; - private List iids; + private Long projectId; + private List iids; private MergeRequestState state; private MergeRequestOrderBy orderBy; private SortOrder sort; @@ -38,8 +38,8 @@ public class MergeRequestFilter { /** * Filter MR by created by the given user id. Combine with scope=all or scope=assigned_to_me */ - private Integer authorId; - private Integer assigneeId; + private Long authorId; + private Long assigneeId; private String myReactionEmoji; private String sourceBranch; private String targetBranch; @@ -47,28 +47,28 @@ public class MergeRequestFilter { private MergeRequestSearchIn in; private Boolean wip; - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } - public MergeRequestFilter withProjectId(Integer projectId) { + public MergeRequestFilter withProjectId(Long projectId) { this.projectId = projectId; return (this); } - public List getIids() { + public List getIids() { return iids; } - public void setIids(List iids) { + public void setIids(List iids) { this.iids = iids; } - public MergeRequestFilter withIids(List iids) { + public MergeRequestFilter withIids(List iids) { this.iids = iids; return (this); } @@ -216,28 +216,28 @@ public class MergeRequestFilter { return (this); } - public Integer getAuthorId() { + public Long getAuthorId() { return authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } - public MergeRequestFilter withAuthorId(Integer authorId) { + public MergeRequestFilter withAuthorId(Long authorId) { this.authorId = authorId; return (this); } - public Integer getAssigneeId() { + public Long getAssigneeId() { return assigneeId; } - public void setAssigneeId(Integer assigneeId) { + public void setAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; } - public MergeRequestFilter withAssigneeId(Integer assigneeId) { + public MergeRequestFilter withAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; return (this); } @@ -293,7 +293,7 @@ public class MergeRequestFilter { this.search = search; return (this); } - + public MergeRequestSearchIn getIn() { return in; } diff --git a/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java b/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java index 0a17c6c8..4cad740c 100644 --- a/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java +++ b/src/main/java/org/gitlab4j/api/models/MergeRequestParams.java @@ -14,13 +14,13 @@ public class MergeRequestParams { private String sourceBranch; private String targetBranch; private String title; - private Integer assigneeId; - private List assigneeIds; - private List reviewerIds; - private Integer milestoneId; + private Long assigneeId; + private List assigneeIds; + private List reviewerIds; + private Long milestoneId; private List labels; private String description; - private Integer targetProjectId; + private Long targetProjectId; private StateEvent stateEvent; private Boolean removeSourceBranch; private Boolean squash; @@ -67,7 +67,7 @@ public class MergeRequestParams { * @param assigneeId the assigneeId to set * @return the reference to this MergeRequestParams instance */ - public MergeRequestParams withAssigneeId(Integer assigneeId) { + public MergeRequestParams withAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; return (this); } @@ -79,7 +79,7 @@ public class MergeRequestParams { * @param assigneeIds the assigneeIds to set * @return the reference to this MergeRequestParams instance */ - public MergeRequestParams withAssigneeIds(List assigneeIds) { + public MergeRequestParams withAssigneeIds(List assigneeIds) { this.assigneeIds = assigneeIds; return (this); } @@ -91,7 +91,7 @@ public class MergeRequestParams { * @param reviewerIds the reviewerIds to set * @return the reference to this MergeRequestParams instance */ - public MergeRequestParams withReviewerIds(List reviewerIds) { + public MergeRequestParams withReviewerIds(List reviewerIds) { this.reviewerIds = reviewerIds; return (this); } @@ -102,7 +102,7 @@ public class MergeRequestParams { * @param milestoneId the milestoneId to set * @return the reference to this MergeRequestParams instance */ - public MergeRequestParams withMilestoneId(Integer milestoneId) { + public MergeRequestParams withMilestoneId(Long milestoneId) { this.milestoneId = milestoneId; return (this); } @@ -146,7 +146,7 @@ public class MergeRequestParams { * @param targetProjectId the targetProjectId to set * @return the reference to this MergeRequestParams instance */ - public MergeRequestParams withTargetProjectId(Integer targetProjectId) { + public MergeRequestParams withTargetProjectId(Long targetProjectId) { this.targetProjectId = targetProjectId; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/Milestone.java b/src/main/java/org/gitlab4j/api/models/Milestone.java index 5b289094..133dbedb 100644 --- a/src/main/java/org/gitlab4j/api/models/Milestone.java +++ b/src/main/java/org/gitlab4j/api/models/Milestone.java @@ -10,10 +10,10 @@ public class Milestone { private String description; private Date startDate; private Date dueDate; - private Integer id; - private Integer iid; - private Integer projectId; - private Integer groupId; + private Long id; + private Long iid; + private Long projectId; + private Long groupId; private String state; private String title; private Date updatedAt; @@ -50,35 +50,35 @@ public class Milestone { this.dueDate = dueDate; } - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return this.iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } diff --git a/src/main/java/org/gitlab4j/api/models/Namespace.java b/src/main/java/org/gitlab4j/api/models/Namespace.java index bb4b20fa..cbdd9c48 100644 --- a/src/main/java/org/gitlab4j/api/models/Namespace.java +++ b/src/main/java/org/gitlab4j/api/models/Namespace.java @@ -4,7 +4,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class Namespace { - private Integer id; + private Long id; private String name; private String path; private String kind; @@ -12,11 +12,11 @@ public class Namespace { private String avatarUrl; private String webUrl; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -52,7 +52,7 @@ public class Namespace { this.fullPath = fullPath; } - public Namespace withId(Integer id) { + public Namespace withId(Long id) { this.id = id; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/Note.java b/src/main/java/org/gitlab4j/api/models/Note.java index 4dd61dd4..e3a2e876 100644 --- a/src/main/java/org/gitlab4j/api/models/Note.java +++ b/src/main/java/org/gitlab4j/api/models/Note.java @@ -83,13 +83,13 @@ public class Note { private Boolean downvote; private Date expiresAt; private String fileName; - private Integer id; - private Integer noteableId; - + private Long id; + private Long noteableId; + // Use String for noteableType until the constant is fixed in the GitLab API private String noteableType; - - private Integer noteableIid; + + private Long noteableIid; private Boolean system; private String title; private Date updatedAt; @@ -158,19 +158,19 @@ public class Note { this.fileName = fileName; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getNoteableId() { + public Long getNoteableId() { return noteableId; } - public void setNoteableId(Integer noteableId) { + public void setNoteableId(Long noteableId) { this.noteableId = noteableId; } @@ -182,11 +182,11 @@ public class Note { this.noteableType = noteableType; } - public Integer getNoteableIid() { + public Long getNoteableIid() { return noteableIid; } - public void setNoteableIid(Integer noteableIid) { + public void setNoteableIid(Long noteableIid) { this.noteableIid = noteableIid; } diff --git a/src/main/java/org/gitlab4j/api/models/Package.java b/src/main/java/org/gitlab4j/api/models/Package.java index ae3497cc..9a955522 100644 --- a/src/main/java/org/gitlab4j/api/models/Package.java +++ b/src/main/java/org/gitlab4j/api/models/Package.java @@ -4,16 +4,16 @@ import org.gitlab4j.api.utils.JacksonJson; public class Package { - private Integer id; + private Long id; private String name; private String version; private PackageType packageType; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/PackageFile.java b/src/main/java/org/gitlab4j/api/models/PackageFile.java index 1fd417fd..7ad9db1b 100644 --- a/src/main/java/org/gitlab4j/api/models/PackageFile.java +++ b/src/main/java/org/gitlab4j/api/models/PackageFile.java @@ -6,27 +6,27 @@ import org.gitlab4j.api.utils.JacksonJson; public class PackageFile { - private Integer id; - private Integer packageId; + private Long id; + private Long packageId; private Date created_at; private String fileName; private Long size; private String fileMd5; private String fileSha1; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getPackageId() { + public Long getPackageId() { return packageId; } - public void setPackageId(Integer packageId) { + public void setPackageId(Long packageId) { this.packageId = packageId; } diff --git a/src/main/java/org/gitlab4j/api/models/Pipeline.java b/src/main/java/org/gitlab4j/api/models/Pipeline.java index c4d3e709..f3789323 100644 --- a/src/main/java/org/gitlab4j/api/models/Pipeline.java +++ b/src/main/java/org/gitlab4j/api/models/Pipeline.java @@ -7,7 +7,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class Pipeline { - private Integer id; + private Long id; private PipelineStatus status; private String ref; private String sha; @@ -25,11 +25,11 @@ public class Pipeline { private String webUrl; private DetailedStatus detailedStatus; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java b/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java index 41bae5d8..56bb9696 100644 --- a/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java +++ b/src/main/java/org/gitlab4j/api/models/PipelineSchedule.java @@ -7,7 +7,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class PipelineSchedule { - private Integer id; + private Long id; private String description; private String ref; private String cron; @@ -20,11 +20,11 @@ public class PipelineSchedule { private Owner owner; private List variables; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Project.java b/src/main/java/org/gitlab4j/api/models/Project.java index 9b584904..a343af2e 100644 --- a/src/main/java/org/gitlab4j/api/models/Project.java +++ b/src/main/java/org/gitlab4j/api/models/Project.java @@ -46,13 +46,13 @@ public class Project { private String avatarUrl; private Boolean containerRegistryEnabled; private Date createdAt; - private Integer creatorId; + private Long creatorId; private String defaultBranch; private String description; private Integer forksCount; private Project forkedFromProject; private String httpUrlToRepo; - private Integer id; + private Long id; private Boolean isPublic; private Boolean issuesEnabled; private Boolean jobsEnabled; @@ -163,11 +163,11 @@ public class Project { this.createdAt = createdAt; } - public Integer getCreatorId() { + public Long getCreatorId() { return creatorId; } - public void setCreatorId(Integer creatorId) { + public void setCreatorId(Long creatorId) { this.creatorId = creatorId; } @@ -221,15 +221,15 @@ public class Project { this.httpUrlToRepo = httpUrlToRepo; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Project withId(Integer id) { + public Project withId(Long id) { this.id = id; return (this); } @@ -333,7 +333,7 @@ public class Project { return (this); } - public Project withNamespaceId(int namespaceId) { + public Project withNamespaceId(long namespaceId) { this.namespace = new Namespace(); this.namespace.setId(namespaceId); return (this); diff --git a/src/main/java/org/gitlab4j/api/models/ProjectFilter.java b/src/main/java/org/gitlab4j/api/models/ProjectFilter.java index 7c9f58ae..a966349f 100644 --- a/src/main/java/org/gitlab4j/api/models/ProjectFilter.java +++ b/src/main/java/org/gitlab4j/api/models/ProjectFilter.java @@ -30,8 +30,8 @@ public class ProjectFilter { private Boolean wikiChecksumFailed; private Boolean repositoryChecksumFailed; private AccessLevel minAccessLevel; - private Integer idAfter; - private Integer idBefore; + private Long idAfter; + private Long idBefore; private Date lastActivityAfter; private Date lastActivityBefore; private String repositoryStorage; @@ -44,7 +44,7 @@ public class ProjectFilter { */ public ProjectFilter withArchived(Boolean archived) { this.archived = archived; - return (this); + return (this); } /** @@ -55,7 +55,7 @@ public class ProjectFilter { */ public ProjectFilter withVisibility(Visibility visibility) { this.visibility = visibility; - return (this); + return (this); } /** @@ -103,7 +103,7 @@ public class ProjectFilter { } /** - * Return only limited fields for each project. This is a no-op without + * Return only limited fields for each project. This is a no-op without * authentication as then only simple fields are returned. * * @param simple if true, return only limited fields for each project @@ -160,7 +160,7 @@ public class ProjectFilter { /** * Include custom attributes in response (admins only). - * + * * @param withCustomAttributes if true, include custom attributes in the repsonse * @return the reference to this ProjectFilter instance */ @@ -233,7 +233,8 @@ public class ProjectFilter { * @return the reference to this ProjectFilter instance * @deprecated Replaced by {@link #withMinAccessLevel(AccessLevel) getComponentAt} */ - public ProjectFilter minAccessLevel(AccessLevel minAccessLevel) { + @Deprecated + public ProjectFilter minAccessLevel(AccessLevel minAccessLevel) { this.minAccessLevel = minAccessLevel; return (this); } @@ -255,7 +256,7 @@ public class ProjectFilter { * @param idAfter limit results to projects with IDs greater than the specified project ID * @return the reference to this ProjectFilter instance */ - public ProjectFilter withIdAfter(Integer idAfter) { + public ProjectFilter withIdAfter(Long idAfter) { this.idAfter = idAfter; return (this); } @@ -266,7 +267,7 @@ public class ProjectFilter { * @param idBefore limit results to projects with IDs less than the specified project ID * @return the reference to this ProjectFilter instance */ - public ProjectFilter withIdBefore(Integer idBefore) { + public ProjectFilter withIdBefore(Long idBefore) { this.idBefore = idBefore; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/ProjectHook.java b/src/main/java/org/gitlab4j/api/models/ProjectHook.java index 6993e8f4..12714b3e 100644 --- a/src/main/java/org/gitlab4j/api/models/ProjectHook.java +++ b/src/main/java/org/gitlab4j/api/models/ProjectHook.java @@ -10,13 +10,13 @@ public class ProjectHook { private Boolean buildEvents; private Date createdAt; private Boolean enableSslVerification; - private Integer id; + private Long id; private Boolean issuesEvents; private Boolean mergeRequestsEvents; private Boolean noteEvents; private Boolean jobEvents; private Boolean pipelineEvents; - private Integer projectId; + private Long projectId; private Boolean pushEvents; private Boolean tagPushEvents; private String url; @@ -55,11 +55,11 @@ public class ProjectHook { this.enableSslVerification = enableSslVerification; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -103,11 +103,11 @@ public class ProjectHook { this.pipelineEvents = pipelineEvents; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/models/ProjectSharedGroup.java b/src/main/java/org/gitlab4j/api/models/ProjectSharedGroup.java index 3f015340..213819f0 100644 --- a/src/main/java/org/gitlab4j/api/models/ProjectSharedGroup.java +++ b/src/main/java/org/gitlab4j/api/models/ProjectSharedGroup.java @@ -4,16 +4,16 @@ import org.gitlab4j.api.utils.JacksonJson; public class ProjectSharedGroup { - private Integer groupId; + private Long groupId; private String groupName; private String groupFullPath; private AccessLevel groupAccessLevel; - public int getGroupId() { + public long getGroupId() { return groupId; } - public void setGroupId(int groupId) { + public void setGroupId(long groupId) { this.groupId = groupId; } diff --git a/src/main/java/org/gitlab4j/api/models/PushRules.java b/src/main/java/org/gitlab4j/api/models/PushRules.java index 02bab24f..e86df7d5 100644 --- a/src/main/java/org/gitlab4j/api/models/PushRules.java +++ b/src/main/java/org/gitlab4j/api/models/PushRules.java @@ -6,8 +6,8 @@ import org.gitlab4j.api.utils.JacksonJson; public class PushRules { - private Integer id; - private Integer projectId; + private Long id; + private Long projectId; private String commitMessageRegex; private String commitMessageNegativeRegex; private String branchNameRegex; @@ -21,23 +21,23 @@ public class PushRules { private Boolean commitCommitterCheck; private Boolean rejectUnsignedCommits; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } - - public PushRules withProjectId(Integer projectId) { + + public PushRules withProjectId(Long projectId) { this.projectId = projectId; return (this); } @@ -49,7 +49,7 @@ public class PushRules { public void setCommitMessageRegex(String commitMessageRegex) { this.commitMessageRegex = commitMessageRegex; } - + public PushRules withCommitMessageRegex(String commitMessageRegex) { this.commitMessageRegex = commitMessageRegex; return (this); @@ -62,7 +62,7 @@ public class PushRules { public void setCommitMessageNegativeRegex(String commitMessageNegativeRegex) { this.commitMessageNegativeRegex = commitMessageNegativeRegex; } - + public PushRules withCommitMessageNegativeRegex(String commitMessageNegativeRegex) { this.commitMessageNegativeRegex = commitMessageNegativeRegex; return (this); @@ -74,12 +74,12 @@ public class PushRules { public void setBranchNameRegex(String branchNameRegex) { this.branchNameRegex = branchNameRegex; } - + public PushRules withBranchNameRegex(String branchNameRegex) { this.branchNameRegex = branchNameRegex; return (this); } - + public Boolean getDenyDeleteTag() { return denyDeleteTag; } @@ -87,12 +87,12 @@ public class PushRules { public void setDenyDeleteTag(Boolean denyDeleteTag) { this.denyDeleteTag = denyDeleteTag; } - + public PushRules withDenyDeleteTag(Boolean denyDeleteTag) { this.denyDeleteTag = denyDeleteTag; return (this); } - + public Date getCreatedAt() { return createdAt; } @@ -108,12 +108,12 @@ public class PushRules { public void setMemberCheck(Boolean memberCheck) { this.memberCheck = memberCheck; } - + public PushRules withMemberCheck(Boolean memberCheck) { this.memberCheck = memberCheck; return (this); } - + public Boolean getPreventSecrets() { return preventSecrets; } @@ -121,12 +121,12 @@ public class PushRules { public void setPreventSecrets(Boolean preventSecrets) { this.preventSecrets = preventSecrets; } - + public PushRules withPreventSecrets(Boolean preventSecrets) { this.preventSecrets = preventSecrets; return (this); } - + public String getAuthorEmailRegex() { return authorEmailRegex; } @@ -134,12 +134,12 @@ public class PushRules { public void setAuthorEmailRegex(String authorEmailRegex) { this.authorEmailRegex = authorEmailRegex; } - + public PushRules withAuthorEmailRegex(String authorEmailRegex) { this.authorEmailRegex = authorEmailRegex; return (this); } - + public String getFileNameRegex() { return fileNameRegex; } @@ -147,12 +147,12 @@ public class PushRules { public void setFileNameRegex(String fileNameRegex) { this.fileNameRegex = fileNameRegex; } - + public PushRules withFileNameRegex(String fileNameRegex) { this.fileNameRegex = fileNameRegex; return (this); } - + public Integer getMaxFileSize() { return maxFileSize; } @@ -160,7 +160,7 @@ public class PushRules { public void setMaxFileSize(Integer maxFileSize) { this.maxFileSize = maxFileSize; } - + public PushRules withMaxFileSize(Integer maxFileSize) { this.maxFileSize = maxFileSize; return (this); diff --git a/src/main/java/org/gitlab4j/api/models/RegistryRepository.java b/src/main/java/org/gitlab4j/api/models/RegistryRepository.java index c785698d..bcff1b66 100644 --- a/src/main/java/org/gitlab4j/api/models/RegistryRepository.java +++ b/src/main/java/org/gitlab4j/api/models/RegistryRepository.java @@ -6,17 +6,17 @@ import java.util.Date; public class RegistryRepository { - private Integer id; + private Long id; private String name; private String path; private String location; private Date createdAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/RemoteMirror.java b/src/main/java/org/gitlab4j/api/models/RemoteMirror.java index 9b5903a9..7f8d3884 100644 --- a/src/main/java/org/gitlab4j/api/models/RemoteMirror.java +++ b/src/main/java/org/gitlab4j/api/models/RemoteMirror.java @@ -6,7 +6,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class RemoteMirror { - private Integer id; + private Long id; private Boolean enabled; private String lastError; private Date lastSuccessfulUpdateAt; @@ -17,11 +17,11 @@ public class RemoteMirror { private String updateStatus; private String url; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Runner.java b/src/main/java/org/gitlab4j/api/models/Runner.java index 0d4fd5e7..8e4380d9 100644 --- a/src/main/java/org/gitlab4j/api/models/Runner.java +++ b/src/main/java/org/gitlab4j/api/models/Runner.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue; public class Runner { - private Integer id; + private Long id; private String description; private Boolean active; private Boolean isShared; @@ -67,11 +67,11 @@ public class Runner { } } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -132,7 +132,7 @@ public class Runner { } - public Runner withId(Integer id) { + public Runner withId(Long id) { this.id = id; return this; } diff --git a/src/main/java/org/gitlab4j/api/models/SearchBlob.java b/src/main/java/org/gitlab4j/api/models/SearchBlob.java index 8b283662..63830dbe 100644 --- a/src/main/java/org/gitlab4j/api/models/SearchBlob.java +++ b/src/main/java/org/gitlab4j/api/models/SearchBlob.java @@ -7,10 +7,10 @@ public class SearchBlob { private String basename; private String data; private String filename; - private Integer id; + private Long id; private String ref; private Integer startline; - private Integer projectId; + private Long projectId; public String getBasename() { return basename; @@ -36,11 +36,11 @@ public class SearchBlob { this.filename = filename; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -60,11 +60,11 @@ public class SearchBlob { this.startline = startline; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/models/Snippet.java b/src/main/java/org/gitlab4j/api/models/Snippet.java index 18a30158..edccab18 100644 --- a/src/main/java/org/gitlab4j/api/models/Snippet.java +++ b/src/main/java/org/gitlab4j/api/models/Snippet.java @@ -33,7 +33,7 @@ public class Snippet { private Date createdAt; private Date expiresAt; private String fileName; - private Integer id; + private Long id; private String title; private String updatedAt; private String webUrl; @@ -89,11 +89,11 @@ public class Snippet { this.fileName = fileName; } - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/SshKey.java b/src/main/java/org/gitlab4j/api/models/SshKey.java index 62f2e2a8..ea13cc25 100644 --- a/src/main/java/org/gitlab4j/api/models/SshKey.java +++ b/src/main/java/org/gitlab4j/api/models/SshKey.java @@ -7,19 +7,19 @@ import org.gitlab4j.api.utils.JacksonJson; import com.fasterxml.jackson.annotation.JsonIgnore; public class SshKey { - - private Integer id; + + private Long id; private String title; private String key; private Date createdAt; - private Integer userId; + private Long userId; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -48,11 +48,11 @@ public class SshKey { } @JsonIgnore - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } diff --git a/src/main/java/org/gitlab4j/api/models/SystemHook.java b/src/main/java/org/gitlab4j/api/models/SystemHook.java index a83aa7eb..e373fd20 100644 --- a/src/main/java/org/gitlab4j/api/models/SystemHook.java +++ b/src/main/java/org/gitlab4j/api/models/SystemHook.java @@ -6,7 +6,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class SystemHook { - private Integer id; + private Long id; private String url; private Date createdAt; private Boolean pushEvents; @@ -15,11 +15,11 @@ public class SystemHook { private Boolean repositoryUpdateEvents; private Boolean mergeRequestsEvents; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -79,7 +79,7 @@ public class SystemHook { return mergeRequestsEvents; } - public SystemHook withId(Integer id) { + public SystemHook withId(Long id) { this.id = id; return (this); } diff --git a/src/main/java/org/gitlab4j/api/models/Todo.java b/src/main/java/org/gitlab4j/api/models/Todo.java index 35c879bb..69bdc597 100644 --- a/src/main/java/org/gitlab4j/api/models/Todo.java +++ b/src/main/java/org/gitlab4j/api/models/Todo.java @@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; public class Todo { - private Integer id; + private Long id; private Project project; private Author author; private TodoAction actionName; @@ -33,11 +33,11 @@ public class Todo { private TodoState state; private Date createdAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/models/Trigger.java b/src/main/java/org/gitlab4j/api/models/Trigger.java index c9623ac6..f284cc09 100644 --- a/src/main/java/org/gitlab4j/api/models/Trigger.java +++ b/src/main/java/org/gitlab4j/api/models/Trigger.java @@ -4,7 +4,7 @@ import java.util.Date; public class Trigger { - private Integer id; + private Long id; private String description; private Date createdAt; private Date lastUsed; @@ -12,11 +12,11 @@ public class Trigger { private Date updatedAt; private User owner; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/services/NotificationService.java b/src/main/java/org/gitlab4j/api/services/NotificationService.java index c2c108dc..c1d74634 100644 --- a/src/main/java/org/gitlab4j/api/services/NotificationService.java +++ b/src/main/java/org/gitlab4j/api/services/NotificationService.java @@ -33,7 +33,7 @@ public abstract class NotificationService { public static final String PROJECT_URL_PROP = "project_url"; public static final String PUSH_EVENTS_PROP = "push_events"; - private Integer id; + private Long id; private String title; private String slug; private Date createdAt; @@ -56,11 +56,11 @@ public abstract class NotificationService { public abstract GitLabApiForm servicePropertiesForm(); - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java index e63a2f3b..afb89870 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java @@ -15,11 +15,11 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { private String groupAccess; private String groupName; private String groupPath; - private Integer groupId; + private Long groupId; private String userEmail; private String userName; private String userUsername; - private Integer userId; + private Long userId; public Date getCreatedAt() { return createdAt; @@ -37,7 +37,8 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { this.updatedAt = updatedAt; } - public String getEventName() { + @Override + public String getEventName() { return this.eventName; } @@ -69,11 +70,11 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { this.groupPath = groupPath; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } @@ -101,11 +102,11 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { this.userUsername = userUsername; } - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java index ed08fc5b..76f9f713 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java @@ -5,18 +5,18 @@ import java.util.Date; import org.gitlab4j.api.utils.JacksonJson; public class GroupSystemHookEvent extends AbstractSystemHookEvent { - + public static final String GROUP_CREATE_EVENT = "group_create"; public static final String GROUP_DESTROY_EVENT = "group_destroy"; public static final String GROUP_RENAME_EVENT = "group_rename"; - + private Date createdAt; private Date updatedAt; private String eventName; private String name; private String path; private String fullPath; - private Integer groupId; + private Long groupId; private String ownerEmail; private String ownerName; private String oldPath; @@ -38,7 +38,8 @@ public class GroupSystemHookEvent extends AbstractSystemHookEvent { this.updatedAt = updatedAt; } - public String getEventName() { + @Override + public String getEventName() { return this.eventName; } @@ -70,11 +71,11 @@ public class GroupSystemHookEvent extends AbstractSystemHookEvent { this.fullPath = fullPath; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java index 1d382052..ed29138a 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java @@ -14,7 +14,7 @@ public class KeySystemHookEvent extends AbstractSystemHookEvent { private String eventName; private String username; private String key; - private Integer id; + private Long id; public Date getCreatedAt() { return createdAt; @@ -56,11 +56,11 @@ public class KeySystemHookEvent extends AbstractSystemHookEvent { this.key = key; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java index 4dad26db..0ab31ad7 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java @@ -6,13 +6,13 @@ import org.gitlab4j.api.models.Visibility; import org.gitlab4j.api.utils.JacksonJson; public class ProjectSystemHookEvent extends AbstractSystemHookEvent { - + public static final String PROJECT_CREATE_EVENT = "project_create"; public static final String PROJECT_DESTROY_EVENT = "project_destroy"; public static final String PROJECT_RENAME_EVENT = "project_rename"; public static final String PROJECT_TRANSFER_EVENT = "project_transfer"; - public static final String PROJECT_UPDATE_EVENT = "project_update"; - + public static final String PROJECT_UPDATE_EVENT = "project_update"; + private Date createdAt; private Date updatedAt; private String eventName; @@ -20,7 +20,7 @@ public class ProjectSystemHookEvent extends AbstractSystemHookEvent { private String ownerEmail; private String ownerName; private String path; - private Integer projectId; + private Long projectId; private String pathWithNamespace; private Visibility projectVisibility; private String oldPathWithNamespace; @@ -41,7 +41,8 @@ public class ProjectSystemHookEvent extends AbstractSystemHookEvent { this.updatedAt = updatedAt; } - public String getEventName() { + @Override + public String getEventName() { return this.eventName; } @@ -81,11 +82,11 @@ public class ProjectSystemHookEvent extends AbstractSystemHookEvent { this.path = path; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java index b969d2f3..5c6dd985 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java @@ -10,18 +10,19 @@ public class RepositorySystemHookEvent extends AbstractSystemHookEvent { public static final String REPOSITORY_UPDATE_EVENT = "repository_update"; private String eventName; - private Integer userId; + private Long userId; private String userName; private String userEmail; private String userAvatar; - private Integer projectId; + private Long projectId; private EventProject project; private List changes; private List refs; - public String getEventName() { + @Override + public String getEventName() { return (eventName); } @@ -29,11 +30,11 @@ public class RepositorySystemHookEvent extends AbstractSystemHookEvent { this.eventName = eventName; } - public Integer getUserId() { + public Long getUserId() { return this.userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } @@ -61,11 +62,11 @@ public class RepositorySystemHookEvent extends AbstractSystemHookEvent { this.userAvatar = userAvatar; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java index c0080b0a..7c844506 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java @@ -6,22 +6,22 @@ import org.gitlab4j.api.models.Visibility; import org.gitlab4j.api.utils.JacksonJson; public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { - + public static final String NEW_TEAM_MEMBER_EVENT = "user_add_to_team"; public static final String TEAM_MEMBER_REMOVED_EVENT = "user_remove_from_team"; - + private Date createdAt; private Date updatedAt; private String eventName; private String projectAccess; private String projectName; private String projectPath; - private Integer projectId; + private Long projectId; private String projectPathWithNamespace; private String userEmail; private String userName; private String userUsername; - private Integer userId; + private Long userId; private Visibility projectVisibility; public Date getCreatedAt() { @@ -40,7 +40,8 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { this.updatedAt = updatedAt; } - public String getEventName() { + @Override + public String getEventName() { return this.eventName; } @@ -72,11 +73,11 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { this.projectPath = projectPath; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -112,11 +113,11 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { this.userUsername = userUsername; } - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } diff --git a/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java b/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java index 0387030c..09e1775a 100644 --- a/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java +++ b/src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java @@ -5,7 +5,7 @@ import java.util.Date; import org.gitlab4j.api.utils.JacksonJson; public class UserSystemHookEvent extends AbstractSystemHookEvent { - + public static final String USER_CREATE_EVENT = "user_create"; public static final String USER_DESTROY_EVENT = "user_destroy"; public static final String USER_RENAME_EVENT = "user_rename"; @@ -17,11 +17,12 @@ public class UserSystemHookEvent extends AbstractSystemHookEvent { private String email; private String name; private String username; - private Integer userId; + private Long userId; private String oldUsername; private String state; - public String getEventName() { + @Override + public String getEventName() { return this.eventName; } @@ -69,11 +70,11 @@ public class UserSystemHookEvent extends AbstractSystemHookEvent { this.username = username; } - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java b/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java index b04a65e7..dd410902 100644 --- a/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java @@ -13,13 +13,13 @@ public abstract class AbstractPushEvent { private String ref; private String checkoutSha; - private Integer userId; + private Long userId; private String userName; private String userUsername; private String userEmail; private String userAvatar; - private Integer projectId; + private Long projectId; private EventProject project; private EventRepository repository; private List commits; @@ -69,11 +69,11 @@ public abstract class AbstractPushEvent { this.checkoutSha = checkoutSha; } - public Integer getUserId() { + public Long getUserId() { return userId; } - public void setUserId(Integer userId) { + public void setUserId(Long userId) { this.userId = userId; } @@ -109,11 +109,11 @@ public abstract class AbstractPushEvent { this.userAvatar = userAvatar; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -179,7 +179,7 @@ public abstract class AbstractPushEvent { /** * Gets the branch name from the ref. Will return null if the ref does not start with "refs/heads/". - * + * * @return the branch name from the ref */ @JsonIgnore diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java b/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java index 40abbdb6..6bd51aed 100644 --- a/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java +++ b/src/main/java/org/gitlab4j/api/webhook/BuildCommit.java @@ -6,7 +6,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class BuildCommit { - private Integer id; + private Long id; private String sha; private String message; private String authorName; @@ -17,11 +17,11 @@ public class BuildCommit { private Date startedAt; private Date finishedAt; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java b/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java index fe61b03d..4875857b 100644 --- a/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java @@ -18,7 +18,7 @@ public class BuildEvent extends AbstractEvent { private Boolean tag; private String beforeSha; private String sha; - private Integer buildId; + private Long buildId; private String buildName; private String buildStage; private String buildStatus; @@ -27,13 +27,14 @@ public class BuildEvent extends AbstractEvent { private Float buildDuration; private Boolean buildAllowFailure; private String buildFailureReason; - private Integer projectId; + private Long projectId; private String projectName; private User user; private BuildCommit commit; private EventRepository repository; - public String getObjectKind() { + @Override + public String getObjectKind() { return (OBJECT_KIND); } @@ -74,11 +75,11 @@ public class BuildEvent extends AbstractEvent { this.sha = sha; } - public Integer getBuildId() { + public Long getBuildId() { return buildId; } - public void setBuildId(Integer buildId) { + public void setBuildId(Long buildId) { this.buildId = buildId; } @@ -146,11 +147,11 @@ public class BuildEvent extends AbstractEvent { this.buildFailureReason = buildFailureReason; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java b/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java index 9436a493..8491fca6 100644 --- a/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/DeploymentEvent.java @@ -10,7 +10,7 @@ public class DeploymentEvent extends AbstractEvent { private String status; private String statusChangedAt; - private Integer deployableId; + private Long deployableId; private String deployableUrl; private String environment; private EventProject project; @@ -20,7 +20,8 @@ public class DeploymentEvent extends AbstractEvent { private String commitUrl; private String commitTitle; - public String getObjectKind() { + @Override + public String getObjectKind() { return (OBJECT_KIND); } @@ -45,11 +46,11 @@ public class DeploymentEvent extends AbstractEvent { this.statusChangedAt = statusChangedAt; } - public Integer getDeployableId() { + public Long getDeployableId() { return deployableId; } - public void setDeployableId(Integer deployableId) { + public void setDeployableId(Long deployableId) { this.deployableId = deployableId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java b/src/main/java/org/gitlab4j/api/webhook/EventChanges.java index da81479d..70103d90 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventChanges.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventChanges.java @@ -12,24 +12,24 @@ import org.gitlab4j.api.utils.JacksonJson; public abstract class EventChanges { - private ChangeContainer authorId; + private ChangeContainer authorId; private ChangeContainer createdAt; private ChangeContainer updatedAt; - private ChangeContainer updatedById; + private ChangeContainer updatedById; private ChangeContainer title; private ChangeContainer description; private ChangeContainer state; - private ChangeContainer milestoneId; + private ChangeContainer milestoneId; private ChangeContainer> labels; private ChangeContainer> assignees; private ChangeContainer totalTimeSpent; private Map> otherProperties = new LinkedHashMap<>(); - public ChangeContainer getAuthorId() { + public ChangeContainer getAuthorId() { return authorId; } - public void setAuthorId(ChangeContainer authorId) { + public void setAuthorId(ChangeContainer authorId) { this.authorId = authorId; } @@ -49,11 +49,11 @@ public abstract class EventChanges { this.updatedAt = updatedAt; } - public ChangeContainer getUpdatedById() { + public ChangeContainer getUpdatedById() { return updatedById; } - public void setUpdatedById(ChangeContainer updatedById) { + public void setUpdatedById(ChangeContainer updatedById) { this.updatedById = updatedById; } @@ -81,11 +81,11 @@ public abstract class EventChanges { this.state = state; } - public ChangeContainer getMilestoneId() { + public ChangeContainer getMilestoneId() { return milestoneId; } - public void setMilestoneId(ChangeContainer milestoneId) { + public void setMilestoneId(ChangeContainer milestoneId) { this.milestoneId = milestoneId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java b/src/main/java/org/gitlab4j/api/webhook/EventIssue.java index 842b49a2..0a63f3d6 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventIssue.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventIssue.java @@ -6,17 +6,17 @@ import org.gitlab4j.api.utils.JacksonJson; public class EventIssue { - private Integer assigneeId; - private Integer authorId; + private Long assigneeId; + private Long authorId; private String branchName; private Date createdAt; private String description; - private Integer id; - private Integer iid; + private Long id; + private Long iid; private String milestoneId; private Integer position; - private Integer projectId; + private Long projectId; private String state; @@ -26,19 +26,19 @@ public class EventIssue { private String url; private String action; - public Integer getAssigneeId() { + public Long getAssigneeId() { return this.assigneeId; } - public void setAssigneeId(Integer assigneeId) { + public void setAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; } - public Integer getAuthorId() { + public Long getAuthorId() { return this.authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } @@ -66,19 +66,19 @@ public class EventIssue { this.description = description; } - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return this.iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } @@ -98,11 +98,11 @@ public class EventIssue { this.position = position; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java b/src/main/java/org/gitlab4j/api/webhook/EventLabel.java index c106983b..dd8aa8f0 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventLabel.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventLabel.java @@ -11,43 +11,43 @@ import com.fasterxml.jackson.annotation.JsonValue; public class EventLabel { public enum LabelType { - + PROJECT_LABEL; - + private static JacksonJsonEnumHelper enumHelper = new JacksonJsonEnumHelper<>(LabelType.class, true, true); - + @JsonCreator public static LabelType forValue(String value) { return enumHelper.forValue(value); } - + @JsonValue public String toValue() { return (enumHelper.toString(this)); } - + @Override public String toString() { return (enumHelper.toString(this)); } } - private Integer id; + private Long id; private String title; private String color; - private Integer projectId; + private Long projectId; private Date createdAt; private Date updatedAt; private Boolean template; private String description; private LabelType type; - private Integer groupId; + private Long groupId; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -67,11 +67,11 @@ public class EventLabel { this.color = color; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -115,11 +115,11 @@ public class EventLabel { this.type = type; } - public Integer getGroupId() { + public Long getGroupId() { return groupId; } - public void setGroupId(Integer groupId) { + public void setGroupId(Long groupId) { this.groupId = groupId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java b/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java index d8b2e784..157d0dee 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventMergeRequest.java @@ -9,27 +9,27 @@ import org.gitlab4j.api.models.Duration; import org.gitlab4j.api.utils.JacksonJson; public class EventMergeRequest { - - private Integer assigneeId; - private Integer authorId; + + private Long assigneeId; + private Long authorId; private String branchName; private Date createdAt; private String description; - private Integer id; - private Integer iid; + private Long id; + private Long iid; private String mergeCommitSha; private String mergeStatus; - private Integer milestoneId; + private Long milestoneId; private Integer position; private Date lockedAt; - private Integer projectId; + private Long projectId; private String sourceBranch; - private Integer sourceProjectId; + private Long sourceProjectId; private String stCommits; private String stDiffs; private String state; private String targetBranch; - private Integer targetProjectId; + private Long targetProjectId; private String title; private Date updatedAt; @@ -41,39 +41,39 @@ public class EventMergeRequest { private String action; private Assignee assignee; - private Integer updatedById; + private Long updatedById; private String mergeError; private Map mergeParams; private Boolean mergeWhenPipelineSucceeds; - private Integer mergeUserId; + private Long mergeUserId; private Date deletedAt; private String inProgressMergeCommitSha; private Integer lockVersion; private Date last_editedAt; - private Integer lastEditedById; - private Integer headPipelineId; + private Long lastEditedById; + private Long headPipelineId; private Boolean refFetched; - private Integer mergeIid; + private Long mergeIid; private Integer totalTimeSpent; private Duration humanTotalTimeSpent; private Integer timeEstimate; private Duration humanTimeEstimate; - private List assigneeIds; + private List assigneeIds; - public Integer getAssigneeId() { + public Long getAssigneeId() { return this.assigneeId; } - public void setAssigneeId(Integer assigneeId) { + public void setAssigneeId(Long assigneeId) { this.assigneeId = assigneeId; } - public Integer getAuthorId() { + public Long getAuthorId() { return this.authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } @@ -101,19 +101,19 @@ public class EventMergeRequest { this.description = description; } - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Integer getIid() { + public Long getIid() { return this.iid; } - public void setIid(Integer iid) { + public void setIid(Long iid) { this.iid = iid; } @@ -133,11 +133,11 @@ public class EventMergeRequest { this.mergeStatus = mergeStatus; } - public Integer getMilestoneId() { + public Long getMilestoneId() { return this.milestoneId; } - public void setMilestoneId(Integer milestoneId) { + public void setMilestoneId(Long milestoneId) { this.milestoneId = milestoneId; } @@ -157,11 +157,11 @@ public class EventMergeRequest { this.lockedAt = lockedAt; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -173,11 +173,11 @@ public class EventMergeRequest { this.sourceBranch = sourceBranch; } - public Integer getSourceProjectId() { + public Long getSourceProjectId() { return this.sourceProjectId; } - public void setSourceProjectId(Integer sourceProjectId) { + public void setSourceProjectId(Long sourceProjectId) { this.sourceProjectId = sourceProjectId; } @@ -213,11 +213,11 @@ public class EventMergeRequest { this.targetBranch = targetBranch; } - public Integer getTargetProjectId() { + public Long getTargetProjectId() { return this.targetProjectId; } - public void setTargetProjectId(Integer targetProjectId) { + public void setTargetProjectId(Long targetProjectId) { this.targetProjectId = targetProjectId; } @@ -293,11 +293,11 @@ public class EventMergeRequest { this.assignee = assignee; } - public Integer getUpdatedById() { + public Long getUpdatedById() { return updatedById; } - public void setUpdatedById(Integer updatedById) { + public void setUpdatedById(Long updatedById) { this.updatedById = updatedById; } @@ -325,11 +325,11 @@ public class EventMergeRequest { this.mergeWhenPipelineSucceeds = mergeWhenPipelineSucceeds; } - public Integer getMergeUserId() { + public Long getMergeUserId() { return mergeUserId; } - public void setMergeUserId(Integer mergeUserId) { + public void setMergeUserId(Long mergeUserId) { this.mergeUserId = mergeUserId; } @@ -365,19 +365,19 @@ public class EventMergeRequest { this.last_editedAt = last_editedAt; } - public Integer getLastEditedById() { + public Long getLastEditedById() { return lastEditedById; } - public void setLastEditedById(Integer lastEditedById) { + public void setLastEditedById(Long lastEditedById) { this.lastEditedById = lastEditedById; } - public Integer getHeadPipelineId() { + public Long getHeadPipelineId() { return headPipelineId; } - public void setHeadPipelineId(Integer headPipelineId) { + public void setHeadPipelineId(Long headPipelineId) { this.headPipelineId = headPipelineId; } @@ -389,11 +389,11 @@ public class EventMergeRequest { this.refFetched = refFetched; } - public Integer getMergeIid() { + public Long getMergeIid() { return mergeIid; } - public void setMergeIid(Integer mergeIid) { + public void setMergeIid(Long mergeIid) { this.mergeIid = mergeIid; } @@ -429,11 +429,11 @@ public class EventMergeRequest { this.humanTimeEstimate = humanTimeEstimate; } - public List getAssigneeIds() { + public List getAssigneeIds() { return assigneeIds; } - public void setAssigneeIds(List assigneeIds) { + public void setAssigneeIds(List assigneeIds) { this.assigneeIds = assigneeIds; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventProject.java b/src/main/java/org/gitlab4j/api/webhook/EventProject.java index 4ddeed20..4b48fbcb 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventProject.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventProject.java @@ -5,7 +5,7 @@ import org.gitlab4j.api.utils.JacksonJson; public class EventProject { - private Integer id; + private Long id; private String name; private String description; private String webUrl; @@ -22,11 +22,11 @@ public class EventProject { private String sshUrl; private String httpUrl; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java b/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java index 59dedb4a..2f3bc120 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventReleaseLink.java @@ -3,17 +3,17 @@ package org.gitlab4j.api.webhook; import org.gitlab4j.api.utils.JacksonJson; public class EventReleaseLink { - private Integer id; + private Long id; private Boolean external; private String linkType; private String name; private String url; - public Integer getId() { + public Long getId() { return id; } - public void setId(final Integer id) { + public void setId(final Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java b/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java index ed4e80d5..48705439 100644 --- a/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java +++ b/src/main/java/org/gitlab4j/api/webhook/EventSnippet.java @@ -7,11 +7,11 @@ import org.gitlab4j.api.utils.JacksonJson; public class EventSnippet { - private Integer id; + private Long id; private String title; private String content; - private Integer authorId; - private Integer projectId; + private Long authorId; + private Long projectId; private Date createdAt; private Date updatedAt; private String fileName; @@ -19,11 +19,11 @@ public class EventSnippet { private String type; private AccessLevel visibilityLevel; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -43,19 +43,19 @@ public class EventSnippet { this.content = content; } - public Integer getAuthorId() { + public Long getAuthorId() { return this.authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java b/src/main/java/org/gitlab4j/api/webhook/JobEvent.java index 533c302f..94b4971c 100644 --- a/src/main/java/org/gitlab4j/api/webhook/JobEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/JobEvent.java @@ -14,7 +14,7 @@ public class JobEvent extends AbstractEvent { private Boolean tag; private String beforeSha; private String sha; - private Integer jobId; + private Long jobId; private String jobName; private String jobStage; private String jobStatus; @@ -23,13 +23,14 @@ public class JobEvent extends AbstractEvent { private Integer jobDuration; private Boolean jobAllowFailure; private String jobFailureReason; - private Integer projectId; + private Long projectId; private String projectName; private User user; private BuildCommit commit; private EventRepository repository; - public String getObjectKind() { + @Override + public String getObjectKind() { return (OBJECT_KIND); } @@ -70,11 +71,11 @@ public class JobEvent extends AbstractEvent { this.sha = sha; } - public Integer getJobId() { + public Long getJobId() { return jobId; } - public void setJobId(Integer jobId) { + public void setJobId(Long jobId) { this.jobId = jobId; } @@ -142,11 +143,11 @@ public class JobEvent extends AbstractEvent { this.jobFailureReason = jobFailureReason; } - public Integer getProjectId() { + public Long getProjectId() { return projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java index 283dbaa4..b22c762e 100644 --- a/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/NoteEvent.java @@ -16,7 +16,7 @@ public class NoteEvent extends AbstractEvent { public static final String OBJECT_KIND = "note"; private User user; - private Integer projectId; + private Long projectId; private EventProject project; private EventRepository repository; private ObjectAttributes objectAttributes; @@ -25,7 +25,8 @@ public class NoteEvent extends AbstractEvent { private EventMergeRequest mergeRequest; private EventSnippet snippet; - public String getObjectKind() { + @Override + public String getObjectKind() { return (OBJECT_KIND); } @@ -42,11 +43,11 @@ public class NoteEvent extends AbstractEvent { this.user = user; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -129,28 +130,28 @@ public class NoteEvent extends AbstractEvent { public static class ObjectAttributes { - private Integer id; + private Long id; private String note; private String discussionId; private String type; private NoteableType noteableType; - private Integer authorId; + private Long authorId; private Date createdAt; private Date updatedAt; - private Integer projectId; + private Long projectId; private String attachment; private String lineCode; private String commitId; - private Integer noteableId; + private Long noteableId; private Boolean system; private Diff stDiff; private String url; - public Integer getId() { + public Long getId() { return this.id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -186,11 +187,11 @@ public class NoteEvent extends AbstractEvent { this.noteableType = notableType; } - public Integer getAuthorId() { + public Long getAuthorId() { return this.authorId; } - public void setAuthorId(Integer authorId) { + public void setAuthorId(Long authorId) { this.authorId = authorId; } @@ -210,11 +211,11 @@ public class NoteEvent extends AbstractEvent { this.updatedAt = updatedAt; } - public Integer getProjectId() { + public Long getProjectId() { return this.projectId; } - public void setProjectId(Integer projectId) { + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -242,11 +243,11 @@ public class NoteEvent extends AbstractEvent { this.commitId = commitId; } - public Integer getNoteableId() { + public Long getNoteableId() { return noteableId; } - public void setNoteableId(Integer noteableId) { + public void setNoteableId(Long noteableId) { this.noteableId = noteableId; } diff --git a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java index a0bf6240..b70432dc 100644 --- a/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java @@ -70,7 +70,7 @@ public class PipelineEvent extends AbstractEvent { public static class ObjectAttributes { - private Integer id; + private Long id; private String ref; private Boolean tag; private String sha; @@ -83,11 +83,11 @@ public class PipelineEvent extends AbstractEvent { private Integer duration; private List variables; - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java b/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java index 19da884c..c89f6235 100644 --- a/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java +++ b/src/main/java/org/gitlab4j/api/webhook/ReleaseEvent.java @@ -7,7 +7,7 @@ public class ReleaseEvent extends AbstractEvent { public static final String X_GITLAB_EVENT = "Release Hook"; public static final String OBJECT_KIND = "release"; - private Integer id; + private Long id; private String createdAt; private String description; private String name; @@ -19,7 +19,8 @@ public class ReleaseEvent extends AbstractEvent { private EventReleaseAssets assets; private EventCommit commit; - public String getObjectKind() { + @Override + public String getObjectKind() { return (OBJECT_KIND); } @@ -28,11 +29,11 @@ public class ReleaseEvent extends AbstractEvent { throw new RuntimeException("Invalid object_kind (" + objectKind + "), must be '" + OBJECT_KIND + "'"); } - public Integer getId() { + public Long getId() { return id; } - public void setId(final Integer id) { + public void setId(final Long id) { this.id = id; } diff --git a/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java b/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java index b37fa967..fc048fdc 100644 --- a/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java +++ b/src/test/java/org/gitlab4j/api/TestDeploymentsApi.java @@ -1,7 +1,6 @@ package org.gitlab4j.api; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java b/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java index 2ef06de1..bb4cd171 100644 --- a/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java +++ b/src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java @@ -39,28 +39,28 @@ public class TestEpicDiscussionsApi implements Constants { @Test public void testGetEpicDiscussionsByList() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getEpicDiscussions(1, 1); + List discussions = new DiscussionsApi(gitLabApi).getEpicDiscussions(1, 1L); assertNotNull(discussions); assertTrue(compareJson(discussions, "epic-discussions.json")); } @Test public void testGetEpicDiscussionsByListWithMaxItems() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getEpicDiscussions(1, 1, 20); + List discussions = new DiscussionsApi(gitLabApi).getEpicDiscussions(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions, "epic-discussions.json")); } @Test public void testGetEpicDiscussionsByPager() throws Exception { - Pager discussions = new DiscussionsApi(gitLabApi).getEpicDiscussionsPager(1, 1, 20); + Pager discussions = new DiscussionsApi(gitLabApi).getEpicDiscussionsPager(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions.all(), "epic-discussions.json")); } @Test public void testGetEpicDiscussionsByStream() throws Exception { - Stream stream = new DiscussionsApi(gitLabApi).getEpicDiscussionsStream(1, 1); + Stream stream = new DiscussionsApi(gitLabApi).getEpicDiscussionsStream(1, 1L); assertNotNull(stream); List discussions = stream.collect(Collectors.toList()); assertTrue(compareJson(discussions, "epic-discussions.json")); diff --git a/src/test/java/org/gitlab4j/api/TestGroupApi.java b/src/test/java/org/gitlab4j/api/TestGroupApi.java index 379fb673..24360908 100644 --- a/src/test/java/org/gitlab4j/api/TestGroupApi.java +++ b/src/test/java/org/gitlab4j/api/TestGroupApi.java @@ -27,13 +27,13 @@ import org.junit.experimental.categories.Category; /** * In order for these tests to run you must set the following properties in test-gitlab4j.properties - * + * * TEST_HOST_URL * TEST_PRIVATE_TOKEN * TEST_USERNAME * TEST_GROUP * TEST_GROUP_MEMBER_USERNAME - * + * * If any of the above are NULL, all tests in this class will be skipped. * */ @@ -101,7 +101,7 @@ public class TestGroupApi extends AbstractIntegrationTest { if (TEST_REQUEST_ACCESS_USERNAME != null) { Optional user = gitLabApi.getUserApi().getOptionalUser(TEST_REQUEST_ACCESS_USERNAME); if (user.isPresent()) { - Integer userId = user.get().getId(); + Long userId = user.get().getId(); try { gitLabApi.getGroupApi().denyAccessRequest(testGroup, userId); } catch (Exception e) { @@ -204,7 +204,7 @@ public class TestGroupApi extends AbstractIntegrationTest { gitLabApi.sudo(TEST_REQUEST_ACCESS_USERNAME); User user = gitLabApi.getUserApi().getCurrentUser(); assertNotNull(user); - final Integer userId = user.getId(); + final Long userId = user.getId(); try { try { @@ -249,7 +249,7 @@ public class TestGroupApi extends AbstractIntegrationTest { gitLabApi.sudo(TEST_REQUEST_ACCESS_USERNAME); User user = gitLabApi.getUserApi().getCurrentUser(); assertNotNull(user); - final Integer userId = user.getId(); + final Long userId = user.getId(); try { try { diff --git a/src/test/java/org/gitlab4j/api/TestImportExportApi.java b/src/test/java/org/gitlab4j/api/TestImportExportApi.java index 97d1c383..e3e1f54d 100644 --- a/src/test/java/org/gitlab4j/api/TestImportExportApi.java +++ b/src/test/java/org/gitlab4j/api/TestImportExportApi.java @@ -141,7 +141,7 @@ public class TestImportExportApi extends AbstractIntegrationTest { ImportStatus importStatus = gitLabApi.getImportExportApi().startImport(null, exportDownload, TEST_IMPORT_PROJECT_NAME, true, null); assertNotNull(importStatus); - Integer newProjectId = importStatus.getId(); + Long newProjectId = importStatus.getId(); // Wait up to 40 seconds for the import to complete System.out.print("Waiting for import to complete"); diff --git a/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java b/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java index b6b560c6..24fc81d1 100644 --- a/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java +++ b/src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java @@ -39,28 +39,28 @@ public class TestIssueDiscussionsApi implements Constants { @Test public void testGetIssueDiscussionsByList() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getIssueDiscussions(1, 1); + List discussions = new DiscussionsApi(gitLabApi).getIssueDiscussions(1, 1L); assertNotNull(discussions); assertTrue(compareJson(discussions, "issue-discussions.json")); } @Test public void testGetIssueDiscussionsByListWithMaxItems() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getIssueDiscussions(1, 1, 20); + List discussions = new DiscussionsApi(gitLabApi).getIssueDiscussions(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions, "issue-discussions.json")); } @Test public void testGetIssueDiscussionsByPager() throws Exception { - Pager discussions = new DiscussionsApi(gitLabApi).getIssueDiscussionsPager(1, 1, 20); + Pager discussions = new DiscussionsApi(gitLabApi).getIssueDiscussionsPager(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions.all(), "issue-discussions.json")); } @Test public void testGetIssueDiscussionsByStream() throws Exception { - Stream stream = new DiscussionsApi(gitLabApi).getIssueDiscussionsStream(1, 1); + Stream stream = new DiscussionsApi(gitLabApi).getIssueDiscussionsStream(1, 1L); assertNotNull(stream); List discussions = stream.collect(Collectors.toList()); assertTrue(compareJson(discussions, "issue-discussions.json")); diff --git a/src/test/java/org/gitlab4j/api/TestIssuesApi.java b/src/test/java/org/gitlab4j/api/TestIssuesApi.java index d4214685..faa8a798 100644 --- a/src/test/java/org/gitlab4j/api/TestIssuesApi.java +++ b/src/test/java/org/gitlab4j/api/TestIssuesApi.java @@ -52,12 +52,12 @@ import org.junit.experimental.categories.Category; /** * In order for these tests to run you must set the following properties in ~/test-gitlab4j.properties - * + * * TEST_NAMESPACE * TEST_PROJECT_NAME * TEST_HOST_URL * TEST_PRIVATE_TOKEN - * + * * If any of the above are NULL, all tests in this class will be skipped. */ @Category(IntegrationTest.class) @@ -127,7 +127,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testGetIssue() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); Issue foundIssue = gitLabApi.getIssuesApi().getIssue(projectId, issue.getIid()); assertNotNull(foundIssue); @@ -138,7 +138,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testGetIssues() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); List issues = gitLabApi.getIssuesApi().getIssues(projectId); assertNotNull(issues); @@ -166,7 +166,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testCreateIssue() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); String title = getUniqueTitle(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, title, ISSUE_DESCRIPTION); assertNotNull(issue); @@ -174,7 +174,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { assertEquals(ISSUE_DESCRIPTION, issue.getDescription()); assertEquals(IssueState.OPENED, issue.getState()); - List assigneeIds = Arrays.asList(issue.getAuthor().getId()); + List assigneeIds = Arrays.asList(issue.getAuthor().getId()); issue = gitLabApi.getIssuesApi().createIssue(projectId, title, ISSUE_DESCRIPTION, null, assigneeIds, null, null, new Date(), null, null, null); assertNotNull(issue); assertEquals(title, issue.getTitle()); @@ -186,7 +186,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testCloseIssueJustCreated() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); Issue closedIssue = gitLabApi.getIssuesApi().closeIssue(projectId, issue.getIid()); @@ -199,7 +199,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testCloseIssueClosedAt() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); assertNull(issue.getClosedAt()); assertNull(issue.getClosedBy()); @@ -219,7 +219,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testDeleteIssue() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); gitLabApi.getIssuesApi().deleteIssue(projectId, issue.getIid()); @@ -233,12 +233,12 @@ public class TestIssuesApi extends AbstractIntegrationTest { /** * Simplify creation of issues - * + * * @return * @throws GitLabApiException */ private Issue ensureIssue() throws GitLabApiException { - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); String title = getUniqueTitle(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, title, ISSUE_DESCRIPTION); @@ -256,7 +256,7 @@ public class TestIssuesApi extends AbstractIntegrationTest { /** * Expect the given {@link TimeStats} object to have the values - * + * * @param timeStats * @param timeEstimate * @param totalTimeSpent @@ -271,10 +271,10 @@ public class TestIssuesApi extends AbstractIntegrationTest { Issue issue = ensureIssue(); TimeStats timeStats = gitLabApi.getIssuesApi().estimateTime(issue.getProjectId(), issue.getIid(), "1h"); assertTimeStats(timeStats, (60 /* seconds */ * 60 /* minutes */), 0); - + timeStats = gitLabApi.getIssuesApi().estimateTime(issue.getProjectId(), issue.getIid(), 60 * 60); assertTimeStats(timeStats, (60 /* seconds */ * 60 /* minutes */), 0); - + timeStats = gitLabApi.getIssuesApi().estimateTime(issue.getProjectId(), issue.getIid(), new Duration(60 * 60)); assertTimeStats(timeStats, (60 /* seconds */ * 60 /* minutes */), 0); } @@ -293,10 +293,10 @@ public class TestIssuesApi extends AbstractIntegrationTest { Issue issue = ensureIssue(); TimeStats timeStats = gitLabApi.getIssuesApi().addSpentTime(issue.getProjectId(), issue.getIid(), "1h"); assertTimeStats(timeStats, 0, (60 /* seconds */ * 60 /* minutes */)); - + timeStats = gitLabApi.getIssuesApi().addSpentTime(issue.getProjectId(), issue.getIid(), 60 * 60); assertTimeStats(timeStats, 0, 60 * 60 * 2); - + timeStats = gitLabApi.getIssuesApi().addSpentTime(issue.getProjectId(), issue.getIid(), new Duration(60 * 60)); assertTimeStats(timeStats, 0, 60 * 60 * 3); } @@ -314,20 +314,20 @@ public class TestIssuesApi extends AbstractIntegrationTest { public void testGetIssuesWithOptions() throws GitLabApiException { assertNotNull(testProject); - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issueOpen = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); Issue issueClose = gitLabApi.getIssuesApi().createIssue(projectId, getUniqueTitle(), ISSUE_DESCRIPTION); issueClose = gitLabApi.getIssuesApi().closeIssue(projectId, issueClose.getIid()); - final Integer openIid = issueOpen.getIid(); + final Long openIid = issueOpen.getIid(); IssueFilter openFilter = new IssueFilter().withState(IssueState.OPENED); List opens = gitLabApi.getIssuesApi().getIssues(projectId, openFilter); assertNotNull(opens); assertTrue(opens.stream().map(Issue::getIid).anyMatch(iid -> iid.equals(openIid))); - final Integer closedIid = issueClose.getIid(); - IssueFilter closeFilter = new IssueFilter().withState(IssueState.CLOSED); + final Long closedIid = issueClose.getIid(); + IssueFilter closeFilter = new IssueFilter().withState(IssueState.CLOSED); List closes = gitLabApi.getIssuesApi().getIssues(projectId, closeFilter); assertNotNull(closes); assertTrue(closes.stream().map(Issue::getIid).anyMatch(iid -> iid.equals(closedIid))); diff --git a/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java b/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java index 3766dd72..2df3d92a 100644 --- a/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java +++ b/src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java @@ -39,28 +39,28 @@ public class TestMergeRequestDiscussionsApi implements Constants { @Test public void testGetMergeRequestDiscussionsByList() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussions(1, 1); + List discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussions(1, 1L); assertNotNull(discussions); assertTrue(compareJson(discussions, "merge-request-discussions.json")); } @Test public void testGetMergeRequestDiscussionsByListMaxItems() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussions(1, 1, 20); + List discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussions(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions, "merge-request-discussions.json")); } @Test public void testGetMergeRequestDiscussionsByPager() throws Exception { - Pager discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussionsPager(1, 1, 20); + Pager discussions = new DiscussionsApi(gitLabApi).getMergeRequestDiscussionsPager(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions.all(), "merge-request-discussions.json")); } @Test public void testGetMergeRequestDiscussionsByStream() throws Exception { - Stream stream = new DiscussionsApi(gitLabApi).getMergeRequestDiscussionsStream(1, 1); + Stream stream = new DiscussionsApi(gitLabApi).getMergeRequestDiscussionsStream(1, 1L); assertNotNull(stream); List discussions = stream.collect(Collectors.toList()); assertTrue(compareJson(discussions, "merge-request-discussions.json")); diff --git a/src/test/java/org/gitlab4j/api/TestProjectApi.java b/src/test/java/org/gitlab4j/api/TestProjectApi.java index 8c2ed18e..83669137 100644 --- a/src/test/java/org/gitlab4j/api/TestProjectApi.java +++ b/src/test/java/org/gitlab4j/api/TestProjectApi.java @@ -59,13 +59,13 @@ import org.junit.runners.MethodSorters; /** * In order for these tests to run you must set the following properties in ~/test-gitlab4j.properties - * + * * TEST_NAMESPACE * TEST_PROJECT_NAME * TEST_HOST_URL * TEST_PRIVATE_TOKEN * TEST_GROUP_PROJECT - * + * * If any of the above are NULL, all tests in this class will be skipped. * * NOTE: &FixMethodOrder(MethodSorters.NAME_ASCENDING) is very important to insure that the tests are in the correct order @@ -174,7 +174,7 @@ public class TestProjectApi extends AbstractIntegrationTest { if (TEST_REQUEST_ACCESS_USERNAME != null) { Optional user = gitLabApi.getUserApi().getOptionalUser(TEST_REQUEST_ACCESS_USERNAME); if (user.isPresent()) { - Integer userId = user.get().getId(); + Long userId = user.get().getId(); try { gitLabApi.getProjectApi().denyAccessRequest(testProject, userId); } catch (Exception e) { @@ -627,7 +627,7 @@ public class TestProjectApi extends AbstractIntegrationTest { assertTrue(optional.isPresent()); assertEquals(TEST_PROJECT_NAME, optional.get().getName()); - Integer projectId = optional.get().getId(); + Long projectId = optional.get().getId(); optional = gitLabApi.getProjectApi().getOptionalProject(projectId); assertNotNull(optional); assertTrue(optional.isPresent()); @@ -787,7 +787,7 @@ public class TestProjectApi extends AbstractIntegrationTest { gitLabApi.sudo(TEST_REQUEST_ACCESS_USERNAME); User user = gitLabApi.getUserApi().getCurrentUser(); assertNotNull(user); - final Integer userId = user.getId(); + final Long userId = user.getId(); try { try { @@ -832,7 +832,7 @@ public class TestProjectApi extends AbstractIntegrationTest { gitLabApi.sudo(TEST_REQUEST_ACCESS_USERNAME); User user = gitLabApi.getUserApi().getCurrentUser(); assertNotNull(user); - final Integer userId = user.getId(); + final Long userId = user.getId(); try { try { diff --git a/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java b/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java index e6660e63..b5a5d31f 100644 --- a/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java +++ b/src/test/java/org/gitlab4j/api/TestProjectApiSnippets.java @@ -41,12 +41,12 @@ import org.junit.experimental.categories.Category; /** * In order for these tests to run you must set the following properties in ~/test-gitlab4j.properties - * + * * TEST_NAMESPACE * TEST_PROJECT_NAME * TEST_HOST_URL * TEST_PRIVATE_TOKEN - * + * * If any of the above are NULL, all tests in this class will be skipped. */ @Category(IntegrationTest.class) @@ -96,7 +96,7 @@ public class TestProjectApiSnippets extends AbstractIntegrationTest { assumeNotNull(gitLabApi); } - private Snippet createSnippet(String title, String filename, String description, + private Snippet createSnippet(String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { return (gitLabApi.getProjectApi().createSnippet(testProject, title, filename, description, code, visibility)); } @@ -147,7 +147,7 @@ public class TestProjectApiSnippets extends AbstractIntegrationTest { Snippet newSnippet = createSnippet(title, filename, description, code, visibility); assertNotNull(newSnippet); - int snippetId = newSnippet.getId(); + long snippetId = newSnippet.getId(); List snippets = gitLabApi.getProjectApi().getSnippets(testProject); assertNotNull(snippets); for (Snippet snippet : snippets) { @@ -172,7 +172,7 @@ public class TestProjectApiSnippets extends AbstractIntegrationTest { Snippet createdSnippet = createSnippet(title, filename, description, code, visibility); assertNotNull(createdSnippet); - int snippetId = createdSnippet.getId(); + long snippetId = createdSnippet.getId(); gitLabApi.getProjectApi().deleteSnippet(testProject, snippetId); List snippets = gitLabApi.getProjectApi().getSnippets(testProject); if (snippets != null) { @@ -181,7 +181,7 @@ public class TestProjectApiSnippets extends AbstractIntegrationTest { fail("Snippet was not deleted."); } } - } + } } @Test diff --git a/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java b/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java index 745f68e7..4b2f1a84 100644 --- a/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java +++ b/src/test/java/org/gitlab4j/api/TestResourceStateEventsApi.java @@ -39,7 +39,7 @@ public class TestResourceStateEventsApi extends AbstractIntegrationTest { @Test public void testGetCloseReopenIssueEvents() throws GitLabApiException { - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); Issue issue = gitLabApi.getIssuesApi().createIssue(projectId, ISSUE_TITLE, ISSUE_DESCRIPTION); Issue closedIssue = gitLabApi.getIssuesApi().closeIssue(projectId, issue.getIid()); diff --git a/src/test/java/org/gitlab4j/api/TestServicesApi.java b/src/test/java/org/gitlab4j/api/TestServicesApi.java index 537b38d8..089a4f6a 100644 --- a/src/test/java/org/gitlab4j/api/TestServicesApi.java +++ b/src/test/java/org/gitlab4j/api/TestServicesApi.java @@ -70,7 +70,7 @@ public class TestServicesApi extends AbstractIntegrationTest { @Test public void testProjectIdOrPath() throws GitLabApiException { - Integer projectId = testProject.getId(); + Long projectId = testProject.getId(); JiraService jiraServiceById = gitLabApi.getServicesApi().getJiraService(projectId); assertNotNull(jiraServiceById); JiraService jiraServiceByPath = gitLabApi.getServicesApi().getJiraService(testProject.getPathWithNamespace()); diff --git a/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java b/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java index f5f6c9c7..caf25adc 100644 --- a/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java +++ b/src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java @@ -39,28 +39,28 @@ public class TestSnippetDiscussionsApi implements Constants { @Test public void testGetSnippetDiscussionsByList() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussions(1, 1); + List discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussions(1, 1L); assertNotNull(discussions); assertTrue(compareJson(discussions, "snippet-discussions.json")); } @Test public void testGetSnippetDiscussionsByListWithMaxItems() throws Exception { - List discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussions(1, 1, 20); + List discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussions(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions, "snippet-discussions.json")); } @Test public void testGetSnippetDiscussionsByPager() throws Exception { - Pager discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussionsPager(1, 1, 20); + Pager discussions = new DiscussionsApi(gitLabApi).getSnippetDiscussionsPager(1, 1L, 20); assertNotNull(discussions); assertTrue(compareJson(discussions.all(), "snippet-discussions.json")); } @Test public void testGetSnippetDiscussionsByStream() throws Exception { - Stream stream = new DiscussionsApi(gitLabApi).getSnippetDiscussionsStream(1, 1); + Stream stream = new DiscussionsApi(gitLabApi).getSnippetDiscussionsStream(1, 1L); assertNotNull(stream); List discussions = stream.collect(Collectors.toList()); assertTrue(compareJson(discussions, "snippet-discussions.json")); diff --git a/src/test/java/org/gitlab4j/api/TestTodosApi.java b/src/test/java/org/gitlab4j/api/TestTodosApi.java index ca77e6de..3d20d40b 100644 --- a/src/test/java/org/gitlab4j/api/TestTodosApi.java +++ b/src/test/java/org/gitlab4j/api/TestTodosApi.java @@ -127,7 +127,7 @@ public class TestTodosApi extends AbstractIntegrationTest { List todos = gitLabApi.getTodosApi().getPendingTodos(); assertTrue(todos.size() > 0); - Integer foundId = null; + Long foundId = null; for (Todo todo : todos) { if (todo.isIssueTodo() && ((Issue)todo.getTarget()).getIid().intValue() == issue.getIid()) { foundId = todo.getId(); diff --git a/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java b/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java index 6dafd752..87bf9b0b 100644 --- a/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java +++ b/src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java @@ -39,14 +39,14 @@ public class TestUnitMergeRequestApi { @Test public void whenAllArgumentsNull_thenNoAttributesSent() throws Exception { - new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2, null, null, null, null, null, null, + new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2L, null, null, null, null, null, null, null, null, null, null, null); assertEquals(0, attributeCaptor.getValue().size()); } @Test public void falseBooleansAreSerializedCorrectly() throws Exception { - new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2, null, null, null, null, null, null, + new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2L, null, null, null, null, null, null, null, null, null, null, false); assertThat(attributeCaptor.getValue(), hasEntry("allow_collaboration", Collections.singletonList("false"))); @@ -54,7 +54,7 @@ public class TestUnitMergeRequestApi { @Test public void trueBooleansAreSerializedCorrectly() throws Exception { - new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2, null, null, null, null, null, null, + new MergeRequestApi(mockGitLabApi).updateMergeRequest(1, 2L, null, null, null, null, null, null, null, null, null, null, true); assertThat(attributeCaptor.getValue(), hasEntry("allow_collaboration", Collections.singletonList("true"))); diff --git a/src/test/java/org/gitlab4j/api/TestUserApi.java b/src/test/java/org/gitlab4j/api/TestUserApi.java index 4ba5d92a..87638142 100644 --- a/src/test/java/org/gitlab4j/api/TestUserApi.java +++ b/src/test/java/org/gitlab4j/api/TestUserApi.java @@ -298,7 +298,7 @@ public class TestUserApi extends AbstractIntegrationTest { User user = gitLabApi.getUserApi().getCurrentUser(); assertNotNull(user); assertEquals(TEST_SUDO_AS_USERNAME, user.getUsername()); - Integer sudoAsId = user.getId(); + Long sudoAsId = user.getId(); gitLabApi.sudo(null); user = gitLabApi.getUserApi().getCurrentUser(); @@ -366,7 +366,7 @@ public class TestUserApi extends AbstractIntegrationTest { assertEquals(token.getId(), optional.get().getId()); gitLabApi.getUserApi().revokeImpersonationToken(user.getId(), token.getId()); - optional = gitLabApi.getUserApi().getOptionalImpersonationToken(user.getId(), 123456); + optional = gitLabApi.getUserApi().getOptionalImpersonationToken(user.getId(), 123456L); assertNotNull(optional); assertFalse(optional.isPresent()); @@ -452,7 +452,7 @@ public class TestUserApi extends AbstractIntegrationTest { assertEquals(sshKey.getId(), optional.get().getId()); gitLabApi.getUserApi().deleteSshKey(sshKey.getId()); - optional = gitLabApi.getUserApi().getOptionalSshKey(12345); + optional = gitLabApi.getUserApi().getOptionalSshKey(12345L); assertNotNull(optional); assertFalse(optional.isPresent()); assertEquals(Response.Status.NOT_FOUND.getStatusCode(), GitLabApi.getOptionalException(optional).getHttpStatus()); -- GitLab