Unverified Commit f237167c authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze
Browse files

Fix #810 : Change all model Ids to Long

parent bdc1f6d3
...@@ -46,8 +46,8 @@ public abstract class AbstractApi implements Constants { ...@@ -46,8 +46,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Project) { } else if (obj instanceof Project) {
Integer id = ((Project) obj).getId(); Long id = ((Project) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -81,8 +81,8 @@ public abstract class AbstractApi implements Constants { ...@@ -81,8 +81,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Group) { } else if (obj instanceof Group) {
Integer id = ((Group) obj).getId(); Long id = ((Group) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -116,8 +116,8 @@ public abstract class AbstractApi implements Constants { ...@@ -116,8 +116,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof User) { } else if (obj instanceof User) {
Integer id = ((User) obj).getId(); Long id = ((User) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
...@@ -151,8 +151,8 @@ public abstract class AbstractApi implements Constants { ...@@ -151,8 +151,8 @@ public abstract class AbstractApi implements Constants {
return (urlEncode(((String) obj).trim())); return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Label) { } else if (obj instanceof Label) {
Integer id = ((Label) obj).getId(); Long id = ((Label) obj).getId();
if (id != null && id.intValue() > 0) { if (id != null && id.longValue() > 0) {
return (id); return (id);
} }
......
...@@ -37,7 +37,7 @@ public class ApplicationSettingsApi extends AbstractApi { ...@@ -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. * provided ApplicationSettings instance.
* *
* <pre><code>GitLab Endpoint: PUT /api/v4/application/settings</code></pre> * <pre><code>GitLab Endpoint: PUT /api/v4/application/settings</code></pre>
...@@ -117,7 +117,7 @@ public class ApplicationSettingsApi extends AbstractApi { ...@@ -117,7 +117,7 @@ public class ApplicationSettingsApi extends AbstractApi {
String fieldName = fieldNames.next(); String fieldName = fieldNames.next();
switch (fieldName) { switch (fieldName) {
case "id": case "id":
appSettings.setId(root.path(fieldName).asInt()); appSettings.setId(root.path(fieldName).asLong());
break; break;
case "created_at": case "created_at":
......
...@@ -126,7 +126,7 @@ public class ApplicationsApi extends AbstractApi { ...@@ -126,7 +126,7 @@ public class ApplicationsApi extends AbstractApi {
* @param applicationId the ID of the OUAUTH Application to delete * @param applicationId the ID of the OUAUTH Application to delete
* @throws GitLabApiException if any exception occurs * @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); delete(Response.Status.NO_CONTENT, null, "applications", applicationId);
} }
} }
...@@ -32,7 +32,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -32,7 +32,7 @@ public class AuditEventApi extends AbstractApi {
* @return a List of group Audit events * @return a List of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all()); return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all());
} }
...@@ -49,7 +49,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -49,7 +49,7 @@ public class AuditEventApi extends AbstractApi {
* @return a Pager of group Audit events * @return a Pager of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId, int itemsPerPage) throws GitLabApiException { public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId, int itemsPerPage) throws GitLabApiException {
Form form = new GitLabApiForm() Form form = new GitLabApiForm()
.withParam("created_before", ISO8601.toString(created_before, false)) .withParam("created_before", ISO8601.toString(created_before, false))
.withParam("created_after", ISO8601.toString(created_after, false)) .withParam("created_after", ISO8601.toString(created_after, false))
...@@ -70,7 +70,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -70,7 +70,7 @@ public class AuditEventApi extends AbstractApi {
* @return a Stream of group Audit events * @return a Stream of group Audit events
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException { public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream()); return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream());
} }
...@@ -83,7 +83,7 @@ public class AuditEventApi extends AbstractApi { ...@@ -83,7 +83,7 @@ public class AuditEventApi extends AbstractApi {
* @return the group Audit event * @return the group Audit event
* @throws GitLabApiException if any exception occurs * @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); Response response = get(Response.Status.OK, null, "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class)); return (response.readEntity(AuditEvent.class));
} }
......
...@@ -29,7 +29,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -29,7 +29,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified issue * @return a list of AwardEmoji for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getIssueAwardEmojis(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<AwardEmoji> getIssueAwardEmojis(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -45,7 +45,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -45,7 +45,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified merge request * @return a list of AwardEmoji for the specified merge request
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getMergeRequestAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { public List<AwardEmoji> getMergeRequestAwardEmojis(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -61,7 +61,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -61,7 +61,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified snippet * @return a list of AwardEmoji for the specified snippet
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getSnippetAwardEmojis(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { public List<AwardEmoji> getSnippetAwardEmojis(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -78,7 +78,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -78,7 +78,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getIssueNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getIssueNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -95,7 +95,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
return getIssueNoteAwardEmojis(projectIdOrPath, issueIid, noteId); return getIssueNoteAwardEmojis(projectIdOrPath, issueIid, noteId);
} }
...@@ -110,7 +110,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -110,7 +110,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return a list of AwardEmoji for the specified note * @return a list of AwardEmoji for the specified note
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<AwardEmoji> getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException { public List<AwardEmoji> getMergeRequestNoteAwardEmojis(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji");
return response.readEntity(new GenericType<List<AwardEmoji>>() {}); return response.readEntity(new GenericType<List<AwardEmoji>>() {});
...@@ -127,7 +127,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -127,7 +127,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -144,7 +144,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -144,7 +144,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -161,7 +161,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -161,7 +161,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -179,7 +179,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -179,7 +179,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -196,10 +196,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -196,10 +196,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to get * @param awardId the ID of the award emoji to get
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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 @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); return getIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId);
} }
...@@ -215,7 +215,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -215,7 +215,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the specified award emoji * @return an AwardEmoji instance for the specified award emoji
* @throws GitLabApiException if any exception occurs * @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()), Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId);
return (response.readEntity(AwardEmoji.class)); return (response.readEntity(AwardEmoji.class));
...@@ -232,7 +232,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -232,7 +232,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji");
...@@ -250,7 +250,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -250,7 +250,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji");
...@@ -268,7 +268,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -268,7 +268,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji");
...@@ -287,7 +287,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -287,7 +287,7 @@ public class AwardEmojiApi extends AbstractApi {
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(), Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji");
...@@ -305,10 +305,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -305,10 +305,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param name the name of the award emoji to add * @param name the name of the award emoji to add
* @return an AwardEmoji instance for the added award emoji * @return an AwardEmoji instance for the added award emoji
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
* @deprecated use {@link #addIssueNoteAwardEmoji(Object, Integer, Integer, String)} * @deprecated use {@link #addIssueNoteAwardEmoji(Object, Long, Long, String)}
*/ */
@Deprecated @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); return addIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, name);
} }
...@@ -341,7 +341,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -341,7 +341,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
} }
...@@ -356,7 +356,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -356,7 +356,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
} }
...@@ -371,7 +371,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -371,7 +371,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
} }
...@@ -387,7 +387,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -387,7 +387,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId, "award_emoji", awardId);
} }
...@@ -402,10 +402,10 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -402,10 +402,10 @@ public class AwardEmojiApi extends AbstractApi {
* @param noteId the note ID of the note to delete the award emoji from * @param noteId the note ID of the note to delete the award emoji from
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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 @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); deleteIssueNoteAwardEmoji(projectIdOrPath, issueIid, noteId, awardId);
} }
...@@ -420,7 +420,7 @@ public class AwardEmojiApi extends AbstractApi { ...@@ -420,7 +420,7 @@ public class AwardEmojiApi extends AbstractApi {
* @param awardId the ID of the award emoji to delete * @param awardId the ID of the award emoji to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId, "award_emoji", awardId);
} }
......
...@@ -12,10 +12,10 @@ import org.gitlab4j.api.models.BoardList; ...@@ -12,10 +12,10 @@ import org.gitlab4j.api.models.BoardList;
/** /**
* This class implements the client side API for the GitLab Issue Boards API calls. * 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. * a GET request on that group will result to a 404 status code.
* *
* @see <a href="https://docs.gitlab.com/ce/api/boards.html">GitLab Issue Boards API Documentaion</a> * @see <a href="https://docs.gitlab.com/ce/api/boards.html">GitLab Issue Boards API Documentaion</a>
*/ */
public class BoardsApi extends AbstractApi { public class BoardsApi extends AbstractApi {
...@@ -29,7 +29,7 @@ public class BoardsApi extends AbstractApi { ...@@ -29,7 +29,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -42,7 +42,7 @@ public class BoardsApi extends AbstractApi { ...@@ -42,7 +42,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 page the page to get
* @param perPage the number of items per page * @param perPage the number of items per page
* @return a list of project's Boards in the specified range * @return a list of project's Boards in the specified range
...@@ -59,7 +59,7 @@ public class BoardsApi extends AbstractApi { ...@@ -59,7 +59,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param itemsPerPage the number of items per page
* @return a Pager of project's issue boards * @return a Pager of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -74,7 +74,7 @@ public class BoardsApi extends AbstractApi { ...@@ -74,7 +74,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a Stream of project's issue boards
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -87,13 +87,13 @@ public class BoardsApi extends AbstractApi { ...@@ -87,13 +87,13 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @return a Board instance for the specified board ID * @return a Board instance for the specified board ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Board getBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public Board getBoard(Object projectIdOrPath, Long boardId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(Board.class)); return (response.readEntity(Board.class));
} }
...@@ -101,13 +101,13 @@ public class BoardsApi extends AbstractApi { ...@@ -101,13 +101,13 @@ public class BoardsApi extends AbstractApi {
/** /**
* Get an issue board as an Optional instance. * Get an issue board as an Optional instance.
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @return the Board instance for the specified board ID as an Optional instance * @return the Board instance for the specified board ID as an Optional instance
*/ */
public Optional<Board> getOptionalBoard(Object projectIdOrPath, Integer boardId) { public Optional<Board> getOptionalBoard(Object projectIdOrPath, Long boardId) {
try { try {
return (Optional.ofNullable(getBoard(projectIdOrPath, boardId))); return (Optional.ofNullable(getBoard(projectIdOrPath, boardId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -122,7 +122,7 @@ public class BoardsApi extends AbstractApi { ...@@ -122,7 +122,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/boards</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/boards</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param name the name for the new board
* @return the created Board instance * @return the created Board instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -140,7 +140,7 @@ public class BoardsApi extends AbstractApi { ...@@ -140,7 +140,7 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id</code></pre>
* *
* @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 boardId the ID of the board, required
* @param name the new name of the board, optional (can be null) * @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) * @param assigneeId the assignee the board should be scoped to, optional (can be null)
...@@ -150,8 +150,8 @@ public class BoardsApi extends AbstractApi { ...@@ -150,8 +150,8 @@ public class BoardsApi extends AbstractApi {
* @return the updated Board instance * @return the updated Board instance
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList updateBoard(Object projectIdOrPath, Integer boardId, String name, public BoardList updateBoard(Object projectIdOrPath, Long boardId, String name,
Integer assigneeId, Integer milestoneId, String labels, Integer weight) throws GitLabApiException { Long assigneeId, Long milestoneId, String labels, Integer weight) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("name", name) .withParam("name", name)
.withParam("assignee_id", assigneeId) .withParam("assignee_id", assigneeId)
...@@ -170,11 +170,11 @@ public class BoardsApi extends AbstractApi { ...@@ -170,11 +170,11 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @throws GitLabApiException if any exception occurs * @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); delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
} }
...@@ -183,12 +183,12 @@ public class BoardsApi extends AbstractApi { ...@@ -183,12 +183,12 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @return a list of the issue board's lists * @return a list of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public List<BoardList> getBoardLists(Object projectIdOrPath, Long boardId) throws GitLabApiException {
return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).all()); return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).all());
} }
...@@ -198,14 +198,14 @@ public class BoardsApi extends AbstractApi { ...@@ -198,14 +198,14 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param page the page to get * @param page the page to get
* @param perPage the number of Boards per page * @param perPage the number of Boards per page
* @return a list of the issue board's lists in the specified range * @return a list of the issue board's lists in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId, int page, int perPage) throws GitLabApiException { public List<BoardList> getBoardLists(Object projectIdOrPath, Long boardId, int page, int perPage) throws GitLabApiException {
Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage), Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
return (response.readEntity(new GenericType<List<BoardList>>() {})); return (response.readEntity(new GenericType<List<BoardList>>() {}));
...@@ -216,13 +216,13 @@ public class BoardsApi extends AbstractApi { ...@@ -216,13 +216,13 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param itemsPerPage the number of Board instances that will be fetched per page * @param itemsPerPage the number of Board instances that will be fetched per page
* @return a Pager of the issue board's lists * @return a Pager of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<BoardList> getBoardLists(Object projectIdOrPath, Integer boardId, int itemsPerPage) throws GitLabApiException { public Pager<BoardList> getBoardLists(Object projectIdOrPath, Long boardId, int itemsPerPage) throws GitLabApiException {
return (new Pager<BoardList>(this, BoardList.class, itemsPerPage, null, return (new Pager<BoardList>(this, BoardList.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists")); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"));
} }
...@@ -232,12 +232,12 @@ public class BoardsApi extends AbstractApi { ...@@ -232,12 +232,12 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @return a Stream of the issue board's lists * @return a Stream of the issue board's lists
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<BoardList> getBoardsListsStream(Object projectIdOrPath, Integer boardId) throws GitLabApiException { public Stream<BoardList> getBoardsListsStream(Object projectIdOrPath, Long boardId) throws GitLabApiException {
return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).stream()); return (getBoardLists(projectIdOrPath, boardId, getDefaultPerPage()).stream());
} }
...@@ -246,14 +246,14 @@ public class BoardsApi extends AbstractApi { ...@@ -246,14 +246,14 @@ public class BoardsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param listId the ID of the board lists to get * @param listId the ID of the board lists to get
* @return a BoardList instance for the specified board ID and list ID * @return a BoardList instance for the specified board ID and list ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { public BoardList getBoardList(Object projectIdOrPath, Long boardId, Long listId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class)); return (response.readEntity(BoardList.class));
} }
...@@ -261,14 +261,14 @@ public class BoardsApi extends AbstractApi { ...@@ -261,14 +261,14 @@ public class BoardsApi extends AbstractApi {
/** /**
* Get a single issue board list as an Optional instance. * Get a single issue board list as an Optional instance.
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param listId the ID of the board lists to get * @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 * @return a BoardList instance for the specified board ID and list ID as an Optional instance
*/ */
public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Integer boardId, Integer listId) { public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Long boardId, Long listId) {
try { try {
return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId))); return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -279,15 +279,15 @@ public class BoardsApi extends AbstractApi { ...@@ -279,15 +279,15 @@ public class BoardsApi extends AbstractApi {
/** /**
* Creates a new Issue Board list. * Creates a new Issue Board list.
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/boards/:board_id/lists</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/boards/:board_id/lists</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param labelId the ID of the label * @param labelId the ID of the label
* @return the created BoardList instance * @return the created BoardList instance
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("label_id", labelId, true); .withParam("label_id", labelId, true);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists"); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
...@@ -297,16 +297,16 @@ public class BoardsApi extends AbstractApi { ...@@ -297,16 +297,16 @@ public class BoardsApi extends AbstractApi {
/** /**
* Updates an existing Issue Board list. This call is used to change list position. * Updates an existing Issue Board list. This call is used to change list position.
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param listId the ID of the list * @param listId the ID of the list
* @param position the new position for the list * @param position the new position for the list
* @return the updated BoardList instance * @return the updated BoardList instance
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true);
Response response = putWithFormData(Response.Status.OK, formData, Response response = putWithFormData(Response.Status.OK, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
...@@ -316,14 +316,14 @@ public class BoardsApi extends AbstractApi { ...@@ -316,14 +316,14 @@ public class BoardsApi extends AbstractApi {
/** /**
* Soft deletes an existing Issue Board list. Only for admins and project owners. * Soft deletes an existing Issue Board list. Only for admins and project owners.
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 boardId the ID of the board
* @param listId the ID of the list * @param listId the ID of the list
* @throws GitLabApiException if any exception occurs * @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); delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
} }
} }
...@@ -40,7 +40,7 @@ public class CommitsApi extends AbstractApi { ...@@ -40,7 +40,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list containing the commits for the specified project ID
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
...@@ -53,7 +53,7 @@ public class CommitsApi extends AbstractApi { ...@@ -53,7 +53,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 page the page to get
* @param perPage the number of commits per page * @param perPage the number of commits per page
* @return a list containing the commits for the specified project ID * @return a list containing the commits for the specified project ID
...@@ -70,7 +70,7 @@ public class CommitsApi extends AbstractApi { ...@@ -70,7 +70,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param itemsPerPage the number of Commit instances that will be fetched per page
* @return a Pager containing the commits for the specified project ID * @return a Pager containing the commits for the specified project ID
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -84,7 +84,7 @@ public class CommitsApi extends AbstractApi { ...@@ -84,7 +84,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a Stream containing the commits for the specified project ID
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
...@@ -97,7 +97,7 @@ public class CommitsApi extends AbstractApi { ...@@ -97,7 +97,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -114,7 +114,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits?path=:file_path</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits?path=:file_path</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @param path the path to file of a project
* @return a list containing the commits for the specified project ID and file * @return a list containing the commits for the specified project ID and file
...@@ -129,7 +129,7 @@ public class CommitsApi extends AbstractApi { ...@@ -129,7 +129,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -145,7 +145,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -165,7 +165,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -181,7 +181,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -198,7 +198,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -227,7 +227,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -244,7 +244,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -262,7 +262,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -283,7 +283,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -313,7 +313,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 since only commits after or on this date will be returned
* @param until only commits before 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 { ...@@ -334,7 +334,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return the Commit instance for the specified project ID/sha pair * @return the Commit instance for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -349,7 +349,7 @@ public class CommitsApi extends AbstractApi { ...@@ -349,7 +349,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @return the Commit for the specified project ID/sha pair as an Optional instance
*/ */
...@@ -366,7 +366,7 @@ public class CommitsApi extends AbstractApi { ...@@ -366,7 +366,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @return a List of all references (from branches or tags) a commit is pushed to
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -381,7 +381,7 @@ public class CommitsApi extends AbstractApi { ...@@ -381,7 +381,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @param itemsPerPage the number of Commit instances that will be fetched per page * @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 * @return a Pager of references (from branches or tags) a commit is pushed to
...@@ -397,7 +397,7 @@ public class CommitsApi extends AbstractApi { ...@@ -397,7 +397,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @return a Stream of all references (from branches or tags) a commit is pushed to
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -412,7 +412,7 @@ public class CommitsApi extends AbstractApi { ...@@ -412,7 +412,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 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 * @return a List of all references (from branches or tags) a commit is pushed to
...@@ -428,7 +428,7 @@ public class CommitsApi extends AbstractApi { ...@@ -428,7 +428,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 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 * @param itemsPerPage the number of Commit instances that will be fetched per page
...@@ -446,7 +446,7 @@ public class CommitsApi extends AbstractApi { ...@@ -446,7 +446,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 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 * @return a Stream of all references (from branches or tags) a commit is pushed to
...@@ -462,7 +462,7 @@ public class CommitsApi extends AbstractApi { ...@@ -462,7 +462,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA
* @param filter the commit statuses file, contains ref, stage, name, all * @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 * @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 { ...@@ -477,7 +477,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA
* @param filter the commit statuses file, contains ref, stage, name, all * @param filter the commit statuses file, contains ref, stage, name, all
* @param page the page to get * @param page the page to get
...@@ -508,7 +508,7 @@ public class CommitsApi extends AbstractApi { ...@@ -508,7 +508,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA
* @param filter the commit statuses file, contains ref, stage, name, all * @param filter the commit statuses file, contains ref, stage, name, all
* @param itemsPerPage the number of CommitStatus instances that will be fetched per page * @param itemsPerPage the number of CommitStatus instances that will be fetched per page
...@@ -536,7 +536,7 @@ public class CommitsApi extends AbstractApi { ...@@ -536,7 +536,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA
* @param filter the commit statuses file, contains ref, stage, name, all * @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 * @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 { ...@@ -559,7 +559,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/statuses/:sha</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/statuses/:sha</code></pre>
* *
* @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 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 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 * @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 { ...@@ -583,7 +583,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/statuses/:sha</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/statuses/:sha</code></pre>
* *
* @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 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 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) * @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 { ...@@ -591,7 +591,7 @@ public class CommitsApi extends AbstractApi {
* @return a CommitStatus instance with the updated info * @return a CommitStatus instance with the updated info
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @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) { if (projectIdOrPath == null) {
throw new RuntimeException("projectIdOrPath cannot be null"); throw new RuntimeException("projectIdOrPath cannot be null");
...@@ -623,7 +623,7 @@ public class CommitsApi extends AbstractApi { ...@@ -623,7 +623,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return a List of Diff instances for the specified project ID/sha pair * @return a List of Diff instances for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -637,7 +637,7 @@ public class CommitsApi extends AbstractApi { ...@@ -637,7 +637,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @param itemsPerPage the number of Diff instances that will be fetched per page * @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 * @return a Pager of Diff instances for the specified project ID/sha pair
...@@ -662,7 +662,7 @@ public class CommitsApi extends AbstractApi { ...@@ -662,7 +662,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return a Stream of Diff instances for the specified project ID/sha pair * @return a Stream of Diff instances for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -676,7 +676,7 @@ public class CommitsApi extends AbstractApi { ...@@ -676,7 +676,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return a List of Comment instances for the specified project ID/sha pair * @return a List of Comment instances for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -690,7 +690,7 @@ public class CommitsApi extends AbstractApi { ...@@ -690,7 +690,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @param itemsPerPage the number of Comment instances that will be fetched per page * @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 * @return a List of Comment instances for the specified project ID/sha pair
...@@ -705,7 +705,7 @@ public class CommitsApi extends AbstractApi { ...@@ -705,7 +705,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return a Stream of Comment instances for the specified project ID/sha pair * @return a Stream of Comment instances for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -720,7 +720,7 @@ public class CommitsApi extends AbstractApi { ...@@ -720,7 +720,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @param note the text of the comment, required * @param note the text of the comment, required
* @param path the file path relative to the repository, optional * @param path the file path relative to the repository, optional
...@@ -744,7 +744,7 @@ public class CommitsApi extends AbstractApi { ...@@ -744,7 +744,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @param note the text of the comment, required * @param note the text of the comment, required
* @return a Comment instance for the posted comment * @return a Comment instance for the posted comment
...@@ -759,7 +759,7 @@ public class CommitsApi extends AbstractApi { ...@@ -759,7 +759,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 branch tame of the branch to commit into. To create a new branch, also provide startBranch
* @param commitMessage the commit message * @param commitMessage the commit message
* @param startBranch the name of the branch to start the new commit from * @param startBranch the name of the branch to start the new commit from
...@@ -786,7 +786,7 @@ public class CommitsApi extends AbstractApi { ...@@ -786,7 +786,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 branch tame of the branch to commit into. To create a new branch, also provide startBranch
* @param commitMessage the commit message * @param commitMessage the commit message
* @param startBranch the name of the branch to start the new commit from * @param startBranch the name of the branch to start the new commit from
...@@ -814,7 +814,7 @@ public class CommitsApi extends AbstractApi { ...@@ -814,7 +814,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param payload a CommitPayload instance holding the parameters for the commit
* @return the created Commit instance * @return the created Commit instance
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
...@@ -854,7 +854,7 @@ public class CommitsApi extends AbstractApi { ...@@ -854,7 +854,7 @@ public class CommitsApi extends AbstractApi {
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/revert</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/revert</code></pre>
* *
* @since GitLab 11.5 * @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 sha the commit SHA to revert
* @param branch the target branch to revert the commit on * @param branch the target branch to revert the commit on
* @return a Commit instance holding the reverted commit * @return a Commit instance holding the reverted commit
...@@ -873,7 +873,7 @@ public class CommitsApi extends AbstractApi { ...@@ -873,7 +873,7 @@ public class CommitsApi extends AbstractApi {
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/cherry_pick</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/cherry_pick</code></pre>
* *
* @since GitLab 8.15 * @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 sha the commit SHA to cherry pick
* @param branch the target branch to cherry pick the commit on * @param branch the target branch to cherry pick the commit on
* @return a Commit instance holding the cherry picked commit * @return a Commit instance holding the cherry picked commit
...@@ -891,7 +891,7 @@ public class CommitsApi extends AbstractApi { ...@@ -891,7 +891,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA to get merge requests for
* @return a list containing the MergeRequest instances for the specified project/SHA * @return a list containing the MergeRequest instances for the specified project/SHA
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -905,7 +905,7 @@ public class CommitsApi extends AbstractApi { ...@@ -905,7 +905,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA to get merge requests for
* @param itemsPerPage the number of Commit instances that will be fetched per page * @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 * @return a Pager containing the MergeRequest instances for the specified project/SHA
...@@ -921,7 +921,7 @@ public class CommitsApi extends AbstractApi { ...@@ -921,7 +921,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha the commit SHA to get merge requests for
* @return a Stream containing the MergeRequest instances for the specified project/SHA * @return a Stream containing the MergeRequest instances for the specified project/SHA
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -935,7 +935,7 @@ public class CommitsApi extends AbstractApi { ...@@ -935,7 +935,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 sha a commit hash or name of a branch or tag
* @return the GpgSignature instance for the specified project ID/sha pair * @return the GpgSignature instance for the specified project ID/sha pair
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
...@@ -951,7 +951,7 @@ public class CommitsApi extends AbstractApi { ...@@ -951,7 +951,7 @@ public class CommitsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @return the GpgSignature for the specified project ID/sha pair as an Optional instance
*/ */
......
...@@ -49,7 +49,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -49,7 +49,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of pages in the project's registry repositories
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -62,7 +62,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -62,7 +62,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 page the page to get
* @param perPage the number of Package instances per page * @param perPage the number of Package instances per page
* @return a list of registry repositories for the specified range * @return a list of registry repositories for the specified range
...@@ -80,7 +80,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -80,7 +80,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param itemsPerPage the number of RegistryRepository instances per page
* @return a Pager of registry repositories for the specified range * @return a Pager of registry repositories for the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -95,7 +95,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a Stream of pages in the project's registry repositories
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -110,11 +110,11 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -110,11 +110,11 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @throws GitLabApiException if any exception occurs * @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) { if (repositoryId == null) {
throw new RuntimeException("repositoryId cannot be null"); throw new RuntimeException("repositoryId cannot be null");
...@@ -128,12 +128,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -128,12 +128,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @return a list of Repository Tags for the specified repository ID * @return a list of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { public List<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Long repositoryId) throws GitLabApiException {
return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).all(); return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).all();
} }
...@@ -142,13 +142,13 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -142,13 +142,13 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @param itemsPerPage the number of RegistryRepositoryTag instances per page * @param itemsPerPage the number of RegistryRepositoryTag instances per page
* @return a Pager of Repository Tags for the specified repository ID * @return a Pager of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Integer repositoryId, int itemsPerPage) throws GitLabApiException { public Pager<RegistryRepositoryTag> getRepositoryTags(Object projectIdOrPath, Long repositoryId, int itemsPerPage) throws GitLabApiException {
return (new Pager<>(this, RegistryRepositoryTag.class, itemsPerPage, null, return (new Pager<>(this, RegistryRepositoryTag.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags")); "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags"));
} }
...@@ -158,12 +158,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -158,12 +158,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @return a list of Repository Tags for the specified repository ID * @return a list of Repository Tags for the specified repository ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<RegistryRepositoryTag> getRepositoryTagsStream(Object projectIdOrPath, Integer repositoryId) throws GitLabApiException { public Stream<RegistryRepositoryTag> getRepositoryTagsStream(Object projectIdOrPath, Long repositoryId) throws GitLabApiException {
return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).stream(); return getRepositoryTags(projectIdOrPath, repositoryId, getDefaultPerPage()).stream();
} }
...@@ -172,13 +172,13 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -172,13 +172,13 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @param tagName the name of tag * @param tagName the name of tag
* @return the Repository Tag for the specified repository ID * @return the Repository Tag for the specified repository ID
* @throws GitLabApiException if any exception occurs * @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, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags", tagName); "projects", getProjectIdOrPath(projectIdOrPath), "registry", "repositories", repositoryId, "tags", tagName);
return response.readEntity(new GenericType<RegistryRepositoryTag>() { return response.readEntity(new GenericType<RegistryRepositoryTag>() {
...@@ -190,12 +190,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -190,12 +190,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @param tagName the name of tag * @param tagName the name of tag
* @return the Repository Tag for the specified repository ID as the value of the Optional * @return the Repository Tag for the specified repository ID as the value of the Optional
*/ */
public Optional<RegistryRepositoryTag> getOptionalRepositoryTag(Object projectIdOrPath, Integer repositoryId, String tagName) { public Optional<RegistryRepositoryTag> getOptionalRepositoryTag(Object projectIdOrPath, Long repositoryId, String tagName) {
try { try {
return (Optional.ofNullable(getRepositoryTag(projectIdOrPath, repositoryId, tagName))); return (Optional.ofNullable(getRepositoryTag(projectIdOrPath, repositoryId, tagName)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -208,12 +208,12 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -208,12 +208,12 @@ public class ContainerRegistryApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 repositoryId the ID of registry repository
* @param tagName the name of the tag to delete * @param tagName the name of the tag to delete
* @throws GitLabApiException if any exception occurs * @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) { if (repositoryId == null) {
throw new RuntimeException("repositoryId cannot be null"); throw new RuntimeException("repositoryId cannot be null");
...@@ -241,7 +241,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -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 * 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. * 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 repositoryId the ID of registry repository
* @param nameRegex the regex of the name to delete. To delete all tags specify <code>.*</code>. * @param nameRegex the regex of the name to delete. To delete all tags specify <code>.*</code>.
* @param keepN the amount of latest tags of given name to keep. * @param keepN the amount of latest tags of given name to keep.
...@@ -249,7 +249,7 @@ public class ContainerRegistryApi extends AbstractApi { ...@@ -249,7 +249,7 @@ public class ContainerRegistryApi extends AbstractApi {
* <code>1h</code>, <code>1d</code>, <code>1month</code>. * <code>1h</code>, <code>1d</code>, <code>1month</code>.
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("name_regex", nameRegex, true) .withParam("name_regex", nameRegex, true)
......
...@@ -77,7 +77,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -77,7 +77,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -91,7 +91,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -91,7 +91,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 page the page to get
* @param perPage the number of deploy keys per page * @param perPage the number of deploy keys per page
* @return the list of DeployKey in the specified range * @return the list of DeployKey in the specified range
...@@ -108,7 +108,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -108,7 +108,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @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 * @param itemsPerPage the number of DeployKey instances that will be fetched per page
* @return a Pager of DeployKey * @return a Pager of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -123,7 +123,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -123,7 +123,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of DeployKey
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -136,12 +136,12 @@ public class DeployKeysApi extends AbstractApi { ...@@ -136,12 +136,12 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param keyId the ID of the deploy key to delete
* @return the DeployKey instance for the specified project ID and key ID * @return the DeployKey instance for the specified project ID and key ID
* @throws GitLabApiException if any exception occurs * @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) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
...@@ -157,11 +157,11 @@ public class DeployKeysApi extends AbstractApi { ...@@ -157,11 +157,11 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @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 * @return the DeployKey for the specified project ID and key ID as an Optional instance
*/ */
public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Integer keyId) { public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Long keyId) {
try { try {
return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId))); return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -174,7 +174,7 @@ public class DeployKeysApi extends AbstractApi { ...@@ -174,7 +174,7 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 title the new deploy key's title, required
* @param key the new deploy key, required * @param key the new deploy key, required
* @param canPush can deploy key push to the project's repository, optional * @param canPush can deploy key push to the project's repository, optional
...@@ -197,14 +197,14 @@ public class DeployKeysApi extends AbstractApi { ...@@ -197,14 +197,14 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 deployKeyId the ID of the deploy key to update, required
* @param title the title for the deploy key, optional * @param title the title for the deploy key, optional
* @param canPush can deploy key push to the project's repository, optional * @param canPush can deploy key push to the project's repository, optional
* @return an updated DeployKey instance * @return an updated DeployKey instance
* @throws GitLabApiException if any exception occurs * @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) { if (deployKeyId == null) {
throw new RuntimeException("deployKeyId cannot be null"); throw new RuntimeException("deployKeyId cannot be null");
...@@ -224,11 +224,11 @@ public class DeployKeysApi extends AbstractApi { ...@@ -224,11 +224,11 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param keyId the ID of the deploy key to delete
* @throws GitLabApiException if any exception occurs * @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) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
...@@ -242,12 +242,12 @@ public class DeployKeysApi extends AbstractApi { ...@@ -242,12 +242,12 @@ public class DeployKeysApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param keyId the ID of the deploy key to enable
* @return an DeployKey instance with info on the enabled deploy key * @return an DeployKey instance with info on the enabled deploy key
* @throws GitLabApiException if any exception occurs * @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) { if (keyId == null) {
throw new RuntimeException("keyId cannot be null"); throw new RuntimeException("keyId cannot be null");
......
...@@ -26,7 +26,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -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. * Get a list of all deploy tokens across the GitLab instance. This endpoint requires admin access.
* *
* <pre><code>GitLab Endpoint: GET /deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /deploy_tokens</code></pre>
* *
* @return a list of DeployToken * @return a list of DeployToken
...@@ -70,7 +70,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -70,7 +70,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -83,7 +83,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -83,7 +83,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @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 * @param itemsPerPage the number of DeployToken instances that will be fetched per page
* @return a Pager of DeployToken * @return a Pager of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -98,7 +98,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -98,7 +98,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -111,7 +111,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -111,7 +111,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deploy_tokens</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 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} * @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 { ...@@ -132,14 +132,14 @@ public class DeployTokensApi extends AbstractApi {
/** /**
* Removes a deploy token from the group. * Removes a deploy token from the group.
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_tokens/:token_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_tokens/:token_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param tokenId the ID of the deploy token to delete
* @throws GitLabApiException if any exception occurs * @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) { if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null"); throw new RuntimeException("tokenId cannot be null");
...@@ -157,7 +157,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -157,7 +157,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @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 * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -170,7 +170,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -170,7 +170,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @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 * @param itemsPerPage the number of DeployToken instances that will be fetched per page
* @return a Pager of DeployToken * @return a Pager of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -185,7 +185,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -185,7 +185,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/deploy_tokens</code></pre>
* *
* @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 * @return a list of DeployToken
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -198,7 +198,7 @@ public class DeployTokensApi extends AbstractApi { ...@@ -198,7 +198,7 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/deploy_tokens</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/deploy_tokens</code></pre>
* *
* @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 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 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} * @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 { ...@@ -222,11 +222,11 @@ public class DeployTokensApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /groups/:id/deploy_tokens/:token_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /groups/:id/deploy_tokens/:token_id</code></pre>
* *
* @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 * @param tokenId the ID of the deploy token to delete
* @throws GitLabApiException if any exception occurs * @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) { if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null"); throw new RuntimeException("tokenId cannot be null");
......
...@@ -26,7 +26,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -26,7 +26,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of Deployments
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -39,7 +39,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -39,7 +39,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param itemsPerPage the number of Deployments instances that will be fetched per page
* @return a Pager of Deployment * @return a Pager of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -53,7 +53,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -53,7 +53,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @return a Pager of Deployment * @return a Pager of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -67,7 +67,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -67,7 +67,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @param itemsPerPage the number of Deployments instances that will be fetched per page * @param itemsPerPage the number of Deployments instances that will be fetched per page
* @return a Pager of Deployment * @return a Pager of Deployment
...@@ -84,7 +84,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -84,7 +84,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -97,7 +97,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -97,7 +97,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link DeploymentFilter} a DeploymentFilter instance with the filter settings
* @return a list of Deployment * @return a list of Deployment
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -111,12 +111,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -111,12 +111,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param deploymentId the ID of a project's deployment
* @return the specified Deployment instance * @return the specified Deployment instance
* @throws GitLabApiException if any exception occurs * @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(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId); "projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId);
return (response.readEntity(Deployment.class)); return (response.readEntity(Deployment.class));
...@@ -127,11 +127,11 @@ public class DeploymentsApi extends AbstractApi { ...@@ -127,11 +127,11 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param deploymentId the ID of a project's deployment
* @return the specified Deployment as an Optional instance * @return the specified Deployment as an Optional instance
*/ */
public Optional<Deployment> getOptionalDeployment(Object projectIdOrPath, Integer deploymentId) { public Optional<Deployment> getOptionalDeployment(Object projectIdOrPath, Long deploymentId) {
try { try {
return (Optional.ofNullable(getDeployment(projectIdOrPath, deploymentId))); return (Optional.ofNullable(getDeployment(projectIdOrPath, deploymentId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -144,7 +144,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -144,7 +144,7 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/deployments</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/deployments</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 environment The name of the environment to create the deployment for, required
* @param sha The SHA of the commit that is deployed, 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 * @param ref The name of the branch or tag that is deployed, required
...@@ -172,13 +172,13 @@ public class DeploymentsApi extends AbstractApi { ...@@ -172,13 +172,13 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/deployments/:key_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/deployments/:key_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 deploymentId The ID of the deployment to update, required
* @param status The new status of the deployment, required * @param status The new status of the deployment, required
* @return an updated Deployment instance * @return an updated Deployment instance
* @throws GitLabApiException if any exception occurs * @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) { if (deploymentId == null) {
throw new RuntimeException("deploymentId cannot be null"); throw new RuntimeException("deploymentId cannot be null");
...@@ -197,12 +197,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -197,12 +197,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 deploymentId The ID of the deployment to update, required
* @return a list containing the MergeRequest instances shipped with a given deployment * @return a list containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public List<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { public List<MergeRequest> getMergeRequests(Object projectIdOrPath, Long deploymentId) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).all()); return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).all());
} }
...@@ -211,13 +211,13 @@ public class DeploymentsApi extends AbstractApi { ...@@ -211,13 +211,13 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 deploymentId The ID of the deployment to update, required
* @param itemsPerPage the number of Commit instances that will be fetched per page * @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 * @return a Pager containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId, int itemsPerPage) throws GitLabApiException { public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Long deploymentId, int itemsPerPage) throws GitLabApiException {
return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null, return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", deploymentId, "merge_requests")); "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", deploymentId, "merge_requests"));
} }
...@@ -227,12 +227,12 @@ public class DeploymentsApi extends AbstractApi { ...@@ -227,12 +227,12 @@ public class DeploymentsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 deploymentId The ID of the deployment to update, required
* @return a Stream containing the MergeRequest instances shipped with a given deployment * @return a Stream containing the MergeRequest instances shipped with a given deployment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution * @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/ */
public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, Integer deploymentId) throws GitLabApiException { public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, Long deploymentId) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).stream()); return (getMergeRequests(projectIdOrPath, deploymentId, getDefaultPerPage()).stream());
} }
......
...@@ -27,12 +27,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -27,12 +27,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 issueIid the internal ID of the issue
* @return a list containing all the discussions for the specified issue * @return a list containing all the discussions for the specified issue
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage()); Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.all()); return (pager.all());
} }
...@@ -42,13 +42,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -42,13 +42,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 issueIid the internal ID of the issue
* @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the issue * @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the issue
* @return a list containing the discussions for the specified issue * @return a list containing the discussions for the specified issue
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Integer issueIid, int maxItems) throws GitLabApiException { public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Long issueIid, int maxItems) throws GitLabApiException {
if (maxItems < 1) { if (maxItems < 1) {
return (getIssueDiscussions(projectIdOrPath, issueIid)); return (getIssueDiscussions(projectIdOrPath, issueIid));
} else { } else {
...@@ -63,13 +63,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -63,13 +63,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 issueIid the internal ID of the issue
* @param itemsPerPage the number of Discussion instances that will be fetched per page * @param itemsPerPage the number of Discussion instances that will be fetched per page
* @return a Pager containing the Discussion instances for the specified issue * @return a Pager containing the Discussion instances for the specified issue
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Pager<Discussion> getIssueDiscussionsPager(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { public Pager<Discussion> getIssueDiscussionsPager(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null, return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions")); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions"));
} }
...@@ -79,12 +79,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -79,12 +79,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 issueIid the internal ID of the issue
* @return a Stream instance containing the Discussion instances for the specified issue * @return a Stream instance containing the Discussion instances for the specified issue
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Stream<Discussion> getIssueDiscussionsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public Stream<Discussion> getIssueDiscussionsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage()); Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.stream()); return (pager.stream());
} }
...@@ -94,12 +94,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -94,12 +94,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
* *
* @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 snippetId the ID of the snippet
* @return a list containing all the discussions for the specified snippet * @return a list containing all the discussions for the specified snippet
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage()); Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.all()); return (pager.all());
} }
...@@ -109,13 +109,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -109,13 +109,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
* *
* @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 snippetId the ID of the snippet
* @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the snippet * @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the snippet
* @return a list containing the discussions for the specified snippet * @return a list containing the discussions for the specified snippet
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Integer snippetId, int maxItems) throws GitLabApiException { public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Long snippetId, int maxItems) throws GitLabApiException {
if (maxItems < 1) { if (maxItems < 1) {
return (getSnippetDiscussions(projectIdOrPath, snippetId)); return (getSnippetDiscussions(projectIdOrPath, snippetId));
} else { } else {
...@@ -130,13 +130,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -130,13 +130,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
* *
* @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 snippetId the ID of the snippet
* @param itemsPerPage the number of Discussion instances that will be fetched per page * @param itemsPerPage the number of Discussion instances that will be fetched per page
* @return a Pager containing the Discussion instances for the specified snippet * @return a Pager containing the Discussion instances for the specified snippet
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Pager<Discussion> getSnippetDiscussionsPager(Object projectIdOrPath, Integer snippetId, int itemsPerPage) throws GitLabApiException { public Pager<Discussion> getSnippetDiscussionsPager(Object projectIdOrPath, Long snippetId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null, return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "discussions")); "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "discussions"));
} }
...@@ -146,12 +146,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -146,12 +146,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
* *
* @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 snippetId the ID of the snippet
* @return a Stream instance containing the Discussion instances for the specified snippet * @return a Stream instance containing the Discussion instances for the specified snippet
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Stream<Discussion> getSnippetDiscussionsStream(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { public Stream<Discussion> getSnippetDiscussionsStream(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage()); Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.stream()); return (pager.stream());
} }
...@@ -162,12 +162,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -162,12 +162,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
* *
* @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 epicId the internal ID of the epic
* @return a list containing all the discussions for the specified epic * @return a list containing all the discussions for the specified epic
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Integer epicId) throws GitLabApiException { public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Long epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage()); Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.all()); return (pager.all());
} }
...@@ -177,13 +177,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -177,13 +177,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
* *
* @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 epicId the internal ID of the epic
* @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the epic * @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the epic
* @return a list containing the discussions for the specified epic * @return a list containing the discussions for the specified epic
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Integer epicId, int maxItems) throws GitLabApiException { public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Long epicId, int maxItems) throws GitLabApiException {
if (maxItems < 1) { if (maxItems < 1) {
return (getEpicDiscussions(projectIdOrPath, epicId)); return (getEpicDiscussions(projectIdOrPath, epicId));
} else { } else {
...@@ -198,13 +198,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -198,13 +198,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
* *
* @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 epicId the internal ID of the epic
* @param itemsPerPage the number of Discussion instances that will be fetched per page * @param itemsPerPage the number of Discussion instances that will be fetched per page
* @return a Pager containing the Discussion instances for the specified epic * @return a Pager containing the Discussion instances for the specified epic
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Pager<Discussion> getEpicDiscussionsPager(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException { public Pager<Discussion> getEpicDiscussionsPager(Object projectIdOrPath, Long epicId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null, return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "discussions")); "projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "discussions"));
} }
...@@ -214,12 +214,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -214,12 +214,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
* *
* @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 epicId the internal ID of the epic
* @return a Stream instance containing the Discussion instances for the specified epic * @return a Stream instance containing the Discussion instances for the specified epic
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Stream<Discussion> getEpicDiscussionsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException { public Stream<Discussion> getEpicDiscussionsStream(Object projectIdOrPath, Long epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage()); Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.stream()); return (pager.stream());
} }
...@@ -229,12 +229,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -229,12 +229,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
* *
* @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 mergeRequestIid the internal ID of the merge request
* @return a list containing all the discussions for the specified merge request * @return a list containing all the discussions for the specified merge request
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage()); Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.all()); return (pager.all());
} }
...@@ -244,13 +244,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -244,13 +244,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
* *
* @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 mergeRequestIid the internal ID of the merge request
* @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the merge request * @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the merge request
* @return a list containing the discussions for the specified merge request * @return a list containing the discussions for the specified merge request
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid, int maxItems) throws GitLabApiException { public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Long mergeRequestIid, int maxItems) throws GitLabApiException {
if (maxItems < 1) { if (maxItems < 1) {
return (getMergeRequestDiscussions(projectIdOrPath, mergeRequestIid)); return (getMergeRequestDiscussions(projectIdOrPath, mergeRequestIid));
} else { } else {
...@@ -265,13 +265,13 @@ public class DiscussionsApi extends AbstractApi { ...@@ -265,13 +265,13 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
* *
* @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 mergeRequestIid the internal ID of the merge request
* @param itemsPerPage the number of Discussion instances that will be fetched per page * @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 * @return a Pager containing the Discussion instances for the specified merge request
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Pager<Discussion> getMergeRequestDiscussionsPager(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException { public Pager<Discussion> getMergeRequestDiscussionsPager(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null, return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions")); "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions"));
} }
...@@ -281,12 +281,12 @@ public class DiscussionsApi extends AbstractApi { ...@@ -281,12 +281,12 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 mergeRequestIid the internal ID of the merge request
* @return a Stream instance containing the Discussion instances for the specified issue * @return a Stream instance containing the Discussion instances for the specified issue
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Stream<Discussion> getMergeRequestDiscussionsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { public Stream<Discussion> getMergeRequestDiscussionsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage()); Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.stream()); return (pager.stream());
} }
...@@ -297,7 +297,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -297,7 +297,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param body the content of a discussion * @param body the content of a discussion
* @param createdAt date the discussion was created (requires admin or project/group owner rights) * @param createdAt date the discussion was created (requires admin or project/group owner rights)
...@@ -306,7 +306,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -306,7 +306,7 @@ public class DiscussionsApi extends AbstractApi {
* @return a Discussion instance containing the newly created discussion * @return a Discussion instance containing the newly created discussion
* @throws GitLabApiException if any exception occurs during execution * @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 { String body, Date createdAt, String positionHash, Position position) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -339,14 +339,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -339,14 +339,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param resolved resolve/unresolve the discussion * @param resolved resolve/unresolve the discussion
* @return the updated DIscussion instance * @return the updated DIscussion instance
* @throws GitLabApiException if any exception occurs during execution * @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 { String discussionId, Boolean resolved) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("resolved", resolved, true); GitLabApiForm formData = new GitLabApiForm().withParam("resolved", resolved, true);
Response response = put(Response.Status.OK, formData.asMap(), Response response = put(Response.Status.OK, formData.asMap(),
...@@ -359,14 +359,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -359,14 +359,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to delete * @param noteId the note ID to delete
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Integer mergeRequestIid, public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Long mergeRequestIid,
String discussionId, Integer noteId) throws GitLabApiException { String discussionId, Long noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId); "merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId);
} }
...@@ -376,7 +376,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -376,7 +376,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @return a list containing all the discussions for the specified commit * @return a list containing all the discussions for the specified commit
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
...@@ -391,7 +391,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -391,7 +391,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the commit * @param maxItems the maximum number of Discussion instances to get, if &lt; 1 will fetch all Discussion instances for the commit
* @return a list containing the discussions for the specified commit * @return a list containing the discussions for the specified commit
...@@ -412,7 +412,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -412,7 +412,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @param itemsPerPage the number of Discussion instances that will be fetched per page * @param itemsPerPage the number of Discussion instances that will be fetched per page
* @return a Pager containing the Discussion instances for the specified commit * @return a Pager containing the Discussion instances for the specified commit
...@@ -428,7 +428,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -428,7 +428,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @return a Stream instance containing the Discussion instances for the specified commit * @return a Stream instance containing the Discussion instances for the specified commit
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
...@@ -443,7 +443,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -443,7 +443,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @param discussionId the ID of the discussion * @param discussionId the ID of the discussion
* @return the Discussion instance specified by discussionId for the specified commit * @return the Discussion instance specified by discussionId for the specified commit
...@@ -460,7 +460,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -460,7 +460,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id</code></pre>
* *
* @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 commitSha the SHA of the commit to get discussions for
* @param discussionId the ID of the discussion * @param discussionId the ID of the discussion
* @return an Optional instance with the specified Discussion instance as a value * @return an Optional instance with the specified Discussion instance as a value
...@@ -479,7 +479,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -479,7 +479,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
* *
* @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 commitSha the commit SHA to create the discussion for
* @param body the content of a discussion * @param body the content of a discussion
* @param createdAt date the discussion was created (requires admin or project/group owner rights) * @param createdAt date the discussion was created (requires admin or project/group owner rights)
...@@ -522,7 +522,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -522,7 +522,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre>
* *
* @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 commitSha the commit SHA to create the discussion for
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param body the content of a discussion * @param body the content of a discussion
...@@ -548,7 +548,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -548,7 +548,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre>
* *
* @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 commitSha the commit SHA to delete the discussion from
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to modify * @param noteId the note ID to modify
...@@ -557,7 +557,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -557,7 +557,7 @@ public class DiscussionsApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Note modifyCommitDiscussionNote(Object projectIdOrPath, 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); GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true);
Response response = this.putWithFormData(Response.Status.OK, formData, Response response = this.putWithFormData(Response.Status.OK, formData,
...@@ -571,7 +571,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -571,7 +571,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes</code></pre>
* *
* @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 commitSha the commit SHA to delete the discussion from
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to resolve or unresolve * @param noteId the note ID to resolve or unresolve
...@@ -580,7 +580,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -580,7 +580,7 @@ public class DiscussionsApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Note resolveCommitDiscussionNote(Object projectIdOrPath, 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); GitLabApiForm queryParams = new GitLabApiForm().withParam("resolved", resolved);
Response response = this.put(Response.Status.OK, queryParams.asMap(), Response response = this.put(Response.Status.OK, queryParams.asMap(),
...@@ -594,14 +594,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -594,14 +594,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/commits/:commit_sha/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 commitSha the commit SHA to delete the discussion from
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to delete * @param noteId the note ID to delete
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public void deleteCommitDiscussionNote(Object projectIdOrPath, String commitSha, 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), delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"repository", "commits", commitSha, "discussions", discussionId, "notes", noteId); "repository", "commits", commitSha, "discussions", discussionId, "notes", noteId);
} }
...@@ -611,7 +611,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -611,7 +611,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param body the content of a discussion * @param body the content of a discussion
...@@ -619,7 +619,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -619,7 +619,7 @@ public class DiscussionsApi extends AbstractApi {
* @return a Note instance containing the newly created discussion note * @return a Note instance containing the newly created discussion note
* @throws GitLabApiException if any exception occurs during execution * @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 { String discussionId, String body, Date createdAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -636,7 +636,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -636,7 +636,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to modify * @param noteId the note ID to modify
...@@ -645,8 +645,8 @@ public class DiscussionsApi extends AbstractApi { ...@@ -645,8 +645,8 @@ public class DiscussionsApi extends AbstractApi {
* @return a Note instance containing the updated discussion note * @return a Note instance containing the updated discussion note
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Note modifyMergeRequestThreadNote(Object projectIdOrPath, Integer mergeRequestIid, public Note modifyMergeRequestThreadNote(Object projectIdOrPath, Long mergeRequestIid,
String discussionId, Integer noteId, String body, Boolean resolved) throws GitLabApiException { String discussionId, Long noteId, String body, Boolean resolved) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("body", body).withParam("resolved", resolved); GitLabApiForm formData = new GitLabApiForm().withParam("body", body).withParam("resolved", resolved);
Response response = this.putWithFormData(Response.Status.OK, formData, Response response = this.putWithFormData(Response.Status.OK, formData,
...@@ -660,14 +660,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -660,14 +660,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 mergeRequestIid mergeRequestIid the internal ID of the merge request
* @param discussionId the ID of a discussion * @param discussionId the ID of a discussion
* @param noteId the note ID to delete * @param noteId the note ID to delete
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public void deleteMergeRequestThreadNote(Object projectIdOrPath, Integer mergeRequestIid, public void deleteMergeRequestThreadNote(Object projectIdOrPath, Long mergeRequestIid,
String discussionId, Integer noteId) throws GitLabApiException { String discussionId, Long noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId); "merge_requests", mergeRequestIid, "discussions", discussionId, "notes", noteId);
} }
...@@ -677,14 +677,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -677,14 +677,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions</code></pre>
* *
* @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 issueIid The IID of an issue
* @param body the content of the discussion * @param body the content of the discussion
* @param createdAt (optional) date the discussion was created (requires admin or project/group owner rights) * @param createdAt (optional) date the discussion was created (requires admin or project/group owner rights)
* @return a Discussion instance containing the newly created discussion * @return a Discussion instance containing the newly created discussion
* @throws GitLabApiException if any exception occurs during execution * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("body", body, true) .withParam("body", body, true)
.withParam("created_at", createdAt); .withParam("created_at", createdAt);
...@@ -698,7 +698,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -698,7 +698,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes</code></pre>
* *
* @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 issueIid The IID of an issue
* @param discussionId the id of discussion * @param discussionId the id of discussion
* @param body the content of the note * @param body the content of the note
...@@ -706,7 +706,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -706,7 +706,7 @@ public class DiscussionsApi extends AbstractApi {
* @return a Note instance containing the newly created note * @return a Note instance containing the newly created note
* @throws GitLabApiException if any exception occurs during execution * @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 { String discussionId, String body, Date createdAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("body", body, true) .withParam("body", body, true)
...@@ -721,7 +721,7 @@ public class DiscussionsApi extends AbstractApi { ...@@ -721,7 +721,7 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 issueIid The IID of an issue
* @param discussionId the id of discussion * @param discussionId the id of discussion
* @param noteId the id of the note * @param noteId the id of the note
...@@ -729,8 +729,8 @@ public class DiscussionsApi extends AbstractApi { ...@@ -729,8 +729,8 @@ public class DiscussionsApi extends AbstractApi {
* @return a Note instance containing the modified note * @return a Note instance containing the modified note
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public Note modifyIssueThreadNote(Object projectIdOrPath, Integer issueIid, public Note modifyIssueThreadNote(Object projectIdOrPath, Long issueIid,
String discussionId, Integer noteId, String body) throws GitLabApiException { String discussionId, Long noteId, String body) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("body", body, true); .withParam("body", body, true);
Response response = putWithFormData(Response.Status.OK, formData, Response response = putWithFormData(Response.Status.OK, formData,
...@@ -743,14 +743,14 @@ public class DiscussionsApi extends AbstractApi { ...@@ -743,14 +743,14 @@ public class DiscussionsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id</code></pre>
* *
* @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 issueIid The IID of an issue
* @param discussionId the id of discussion * @param discussionId the id of discussion
* @param noteId the id of the note * @param noteId the id of the note
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
public void deleteIssueThreadNote(Object projectIdOrPath, Integer issueIid, public void deleteIssueThreadNote(Object projectIdOrPath, Long issueIid,
String discussionId, Integer noteId) throws GitLabApiException { String discussionId, Long noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions", discussionId, "notes", noteId); delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions", discussionId, "notes", noteId);
} }
......
...@@ -69,7 +69,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -69,7 +69,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return an Environment instance * @return an Environment instance
* @throws GitLabApiException if any exception occurs * @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, Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
return (response.readEntity(Environment.class)); return (response.readEntity(Environment.class));
...@@ -84,7 +84,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -84,7 +84,7 @@ public class EnvironmentsApi extends AbstractApi {
* @param environmentId the ID of the environment to get * @param environmentId the ID of the environment to get
* @return the Environment as an Optional instance * @return the Environment as an Optional instance
*/ */
public Optional<Environment> getOptionalEnvironment(Object projectIdOrPath, Integer environmentId) { public Optional<Environment> getOptionalEnvironment(Object projectIdOrPath, Long environmentId) {
try { try {
return (Optional.ofNullable(getEnvironment(projectIdOrPath, environmentId))); return (Optional.ofNullable(getEnvironment(projectIdOrPath, environmentId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -122,7 +122,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -122,7 +122,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the created Environment instance * @return the created Environment instance
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm formData = new GitLabApiForm().withParam("name", name).withParam("external_url", externalUrl);
Response response = putWithFormData(Response.Status.OK, formData, formData, Response response = putWithFormData(Response.Status.OK, formData, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
...@@ -139,7 +139,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -139,7 +139,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the stopped Environment instance * @return the stopped Environment instance
* @throws GitLabApiException if any exception occurs * @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, Response response = post(Response.Status.OK, (GitLabApiForm) null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop");
return (response.readEntity(Environment.class)); return (response.readEntity(Environment.class));
...@@ -154,7 +154,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -154,7 +154,7 @@ public class EnvironmentsApi extends AbstractApi {
* @param environmentId the ID of the environment to delete * @param environmentId the ID of the environment to delete
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId);
} }
...@@ -169,7 +169,7 @@ public class EnvironmentsApi extends AbstractApi { ...@@ -169,7 +169,7 @@ public class EnvironmentsApi extends AbstractApi {
* @return the Environment instance of the stopped environment * @return the Environment instance of the stopped environment
* @throws GitLabApiException if any exception occurs * @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(); GitLabApiForm formData = new GitLabApiForm();
Response response = post(Response.Status.CREATED, formData, Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop"); "projects", getProjectIdOrPath(projectIdOrPath), "environments", environmentId, "stop");
......
...@@ -14,11 +14,11 @@ import org.gitlab4j.api.models.EpicIssue; ...@@ -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. * This class implements the client side API for the GitLab Epics and Epic Issues API calls.
* *
* NOTE: * 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. * - 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. * - Epics are available only in Ultimate. If epics feature is not available a 403 status code will be returned.
* *
* @see <a href="https://docs.gitlab.com/ee/api/epics.html">GitLab Epics API Documentaion</a> * @see <a href="https://docs.gitlab.com/ee/api/epics.html">GitLab Epics API Documentaion</a>
* @see <a href="https://docs.gitlab.com/ee/api/epic_issues.html">GitLab Epic Issues API Documentation</a> * @see <a href="https://docs.gitlab.com/ee/api/epic_issues.html">GitLab Epic Issues API Documentation</a>
*/ */
...@@ -86,7 +86,7 @@ public class EpicsApi extends AbstractApi { ...@@ -86,7 +86,7 @@ public class EpicsApi extends AbstractApi {
/** /**
* Gets all epics of the requested group and its subgroups. * Gets all epics of the requested group and its subgroups.
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre>
* *
* @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path * @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 { ...@@ -99,7 +99,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of matching epics of the requested group and its subgroups * @return a list of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, public List<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy,
SortOrder sortOrder, String search) throws GitLabApiException { SortOrder sortOrder, String search) throws GitLabApiException {
return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).all()); return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).all());
} }
...@@ -121,7 +121,7 @@ public class EpicsApi extends AbstractApi { ...@@ -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 * @return a list of matching epics of the requested group and its subgroups in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, public List<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException { EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm(page, perPage) GitLabApiForm formData = new GitLabApiForm(page, perPage)
.withParam("author_id", authorId) .withParam("author_id", authorId)
...@@ -149,7 +149,7 @@ public class EpicsApi extends AbstractApi { ...@@ -149,7 +149,7 @@ public class EpicsApi extends AbstractApi {
* @return the Pager of matching epics of the requested group and its subgroups * @return the Pager of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, public Pager<Epic> getEpics(Object groupIdOrPath, Long authorId, String labels,
EpicOrderBy orderBy, SortOrder sortOrder, String search, int itemsPerPage) throws GitLabApiException { EpicOrderBy orderBy, SortOrder sortOrder, String search, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("author_id", authorId) .withParam("author_id", authorId)
...@@ -175,7 +175,7 @@ public class EpicsApi extends AbstractApi { ...@@ -175,7 +175,7 @@ public class EpicsApi extends AbstractApi {
* @return a Stream of matching epics of the requested group and its subgroups * @return a Stream of matching epics of the requested group and its subgroups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Epic> getEpicsStream(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, public Stream<Epic> getEpicsStream(Object groupIdOrPath, Long authorId, String labels, EpicOrderBy orderBy,
SortOrder sortOrder, String search) throws GitLabApiException { SortOrder sortOrder, String search) throws GitLabApiException {
return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).stream()); return (getEpics(groupIdOrPath, authorId, labels, orderBy, sortOrder, search, getDefaultPerPage()).stream());
} }
...@@ -190,7 +190,7 @@ public class EpicsApi extends AbstractApi { ...@@ -190,7 +190,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance for the specified Epic * @return an Epic instance for the specified Epic
* @throws GitLabApiException if any exception occurs * @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); Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
return (response.readEntity(Epic.class)); return (response.readEntity(Epic.class));
} }
...@@ -204,7 +204,7 @@ public class EpicsApi extends AbstractApi { ...@@ -204,7 +204,7 @@ public class EpicsApi extends AbstractApi {
* @param epicIid the IID of the epic to get * @param epicIid the IID of the epic to get
* @return an Optional instance with the specified Epic as a value * @return an Optional instance with the specified Epic as a value
*/ */
public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Integer epicIid) { public Optional<Epic> getOptionalEpic(Object groupIdOrPath, Long epicIid) {
try { try {
return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid))); return (Optional.ofNullable(getEpic(groupIdOrPath, epicIid)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -240,14 +240,14 @@ public class EpicsApi extends AbstractApi { ...@@ -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: * fields from the Epic instance are used:
* <pre><code> * <pre><code>
* title - the title of the epic (required) * title - the title of the epic (required)
* labels - comma separated list of labels (optional) * labels - comma separated list of labels (optional)
* description - the description of the epic (optional) * description - the description of the epic (optional)
* startDate - the start date 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)
* </code></pre> * </code></pre>
* *
* <pre><code>GitLab Endpoint: POST /groups/:id/epics</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/epics</code></pre>
...@@ -284,7 +284,7 @@ public class EpicsApi extends AbstractApi { ...@@ -284,7 +284,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance containing info on the newly created epic * @return an Epic instance containing info on the newly created epic
* @throws GitLabApiException if any exception occurs * @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 { Date startDate, Date endDate) throws GitLabApiException {
Form formData = new GitLabApiForm() Form formData = new GitLabApiForm()
.withParam("title", title, true) .withParam("title", title, true)
...@@ -298,14 +298,14 @@ public class EpicsApi extends AbstractApi { ...@@ -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: * fields from the Epic instance are used:
* <pre><code> * <pre><code>
* title - the title of the epic (optional) * title - the title of the epic (optional)
* labels - comma separated list of labels (optional) * labels - comma separated list of labels (optional)
* description - the description of the epic (optional) * description - the description of the epic (optional)
* startDate - the start date 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)
* </code></pre> * </code></pre>
* <pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid</code></pre> * <pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid</code></pre>
* *
...@@ -315,7 +315,7 @@ public class EpicsApi extends AbstractApi { ...@@ -315,7 +315,7 @@ public class EpicsApi extends AbstractApi {
* @return an Epic instance containing info on the updated epic * @return an Epic instance containing info on the updated epic
* @throws GitLabApiException if any exception occurs * @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() Form formData = new GitLabApiForm()
.withParam("title", epic.getTitle(), true) .withParam("title", epic.getTitle(), true)
.withParam("labels", epic.getLabels()) .withParam("labels", epic.getLabels())
...@@ -336,7 +336,7 @@ public class EpicsApi extends AbstractApi { ...@@ -336,7 +336,7 @@ public class EpicsApi extends AbstractApi {
* @param epicIid the IID of the epic to delete * @param epicIid the IID of the epic to delete
* @throws GitLabApiException if any exception occurs * @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); delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid);
} }
...@@ -350,7 +350,7 @@ public class EpicsApi extends AbstractApi { ...@@ -350,7 +350,7 @@ public class EpicsApi extends AbstractApi {
* @return a list of all epic issues belonging to the specified epic * @return a list of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public List<Epic> getEpicIssues(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all()); return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).all());
} }
...@@ -367,7 +367,7 @@ public class EpicsApi extends AbstractApi { ...@@ -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 * @return a list of all epic issues belonging to the specified epic in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException { public List<Epic> 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"); Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues");
return (response.readEntity(new GenericType<List<Epic>>() { })); return (response.readEntity(new GenericType<List<Epic>>() { }));
} }
...@@ -383,7 +383,7 @@ public class EpicsApi extends AbstractApi { ...@@ -383,7 +383,7 @@ public class EpicsApi extends AbstractApi {
* @return the Pager of all epic issues belonging to the specified epic * @return the Pager of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException { public Pager<Epic> getEpicIssues(Object groupIdOrPath, Long epicIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues")); return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"));
} }
...@@ -397,7 +397,7 @@ public class EpicsApi extends AbstractApi { ...@@ -397,7 +397,7 @@ public class EpicsApi extends AbstractApi {
* @return a Stream of all epic issues belonging to the specified epic * @return a Stream of all epic issues belonging to the specified epic
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Long epicIid) throws GitLabApiException {
return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream()); return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream());
} }
...@@ -413,7 +413,7 @@ public class EpicsApi extends AbstractApi { ...@@ -413,7 +413,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the newly assigned epic issue * @return an EpicIssue instance containing info on the newly assigned epic issue
* @throws GitLabApiException if any exception occurs * @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, Response response = post(Response.Status.CREATED, (Form)null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.class)); return (response.readEntity(EpicIssue.class));
...@@ -430,7 +430,7 @@ public class EpicsApi extends AbstractApi { ...@@ -430,7 +430,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the removed issue * @return an EpicIssue instance containing info on the removed issue
* @throws GitLabApiException if any exception occurs * @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, Response response = delete(Response.Status.OK, null,
"groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid);
return (response.readEntity(EpicIssue.class)); return (response.readEntity(EpicIssue.class));
...@@ -449,7 +449,7 @@ public class EpicsApi extends AbstractApi { ...@@ -449,7 +449,7 @@ public class EpicsApi extends AbstractApi {
* @return an EpicIssue instance containing info on the newly assigned epic issue * @return an EpicIssue instance containing info on the newly assigned epic issue
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm form = new GitLabApiForm()
.withParam("move_before_id", moveBeforeId) .withParam("move_before_id", moveBeforeId)
.withParam("move_after_id", moveAfterId); .withParam("move_after_id", moveAfterId);
......
...@@ -296,7 +296,7 @@ public class EventsApi extends AbstractApi { ...@@ -296,7 +296,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -315,7 +315,7 @@ public class EventsApi extends AbstractApi { ...@@ -315,7 +315,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -326,7 +326,7 @@ public class EventsApi extends AbstractApi { ...@@ -326,7 +326,7 @@ public class EventsApi extends AbstractApi {
* @return a list of events for the specified project and matching the supplied parameters * @return a list of events for the specified project and matching the supplied parameters
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Event> getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType, public List<Event> getProjectEvents(Long projectIdOrPath, ActionType action, TargetType targetType,
Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException { Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -348,7 +348,7 @@ public class EventsApi extends AbstractApi { ...@@ -348,7 +348,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
...@@ -358,7 +358,7 @@ public class EventsApi extends AbstractApi { ...@@ -358,7 +358,7 @@ public class EventsApi extends AbstractApi {
* @return a Pager of events for the specified project and matching the supplied parameters * @return a Pager of events for the specified project and matching the supplied parameters
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, public Pager<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after,
SortOrder sortOrder, int itemsPerPage) throws GitLabApiException { SortOrder sortOrder, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
...@@ -377,7 +377,7 @@ public class EventsApi extends AbstractApi { ...@@ -377,7 +377,7 @@ public class EventsApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> * <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 action include only events of a particular action type, optional
* @param targetType include only events of a particular target type, optional * @param targetType include only events of a particular target type, optional
* @param before include only events created before a particular date, optional * @param before include only events created before a particular date, optional
......
...@@ -449,7 +449,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -449,7 +449,7 @@ public class GitLabApi implements AutoCloseable {
*/ */
public final GitLabApi duplicate() { public final GitLabApi duplicate() {
Integer sudoUserId = this.getSudoAsId(); Long sudoUserId = this.getSudoAsId();
GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl, GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl,
getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties); getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties);
if (sudoUserId != null) { if (sudoUserId != null) {
...@@ -661,7 +661,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -661,7 +661,7 @@ public class GitLabApi implements AutoCloseable {
throw new GitLabApiException("the specified username was not found"); throw new GitLabApiException("the specified username was not found");
} }
Integer sudoAsId = user.getId(); Long sudoAsId = user.getId();
apiClient.setSudoAsId(sudoAsId); apiClient.setSudoAsId(sudoAsId);
} }
...@@ -679,7 +679,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -679,7 +679,7 @@ public class GitLabApi implements AutoCloseable {
* @param sudoAsId the ID of the user to sudo as, null will turn off sudo * @param sudoAsId the ID of the user to sudo as, null will turn off sudo
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public void setSudoAsId(Integer sudoAsId) throws GitLabApiException { public void setSudoAsId(Long sudoAsId) throws GitLabApiException {
if (sudoAsId == null) { if (sudoAsId == null) {
apiClient.setSudoAsId(null); apiClient.setSudoAsId(null);
...@@ -700,7 +700,7 @@ public class GitLabApi implements AutoCloseable { ...@@ -700,7 +700,7 @@ public class GitLabApi implements AutoCloseable {
* *
* @return the current sudo as ID, will return null if not in sudo mode * @return the current sudo as ID, will return null if not in sudo mode
*/ */
public Integer getSudoAsId() { public Long getSudoAsId() {
return (apiClient.getSudoAsId()); return (apiClient.getSudoAsId());
} }
......
...@@ -68,7 +68,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -68,7 +68,7 @@ public class GitLabApiClient implements AutoCloseable {
private boolean ignoreCertificateErrors; private boolean ignoreCertificateErrors;
private SSLContext openSslContext; private SSLContext openSslContext;
private HostnameVerifier openHostnameVerifier; private HostnameVerifier openHostnameVerifier;
private Integer sudoAsId; private Long sudoAsId;
private Integer connectTimeout; private Integer connectTimeout;
private Integer readTimeout; private Integer readTimeout;
...@@ -322,7 +322,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -322,7 +322,7 @@ public class GitLabApiClient implements AutoCloseable {
* Set the ID of the user to sudo as. * Set the ID of the user to sudo as.
* *
*/ */
Integer getSudoAsId() { Long getSudoAsId() {
return (sudoAsId); return (sudoAsId);
} }
...@@ -331,7 +331,7 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -331,7 +331,7 @@ public class GitLabApiClient implements AutoCloseable {
* *
* @param sudoAsId the ID of the user to sudo as * @param sudoAsId the ID of the user to sudo as
*/ */
void setSudoAsId(Integer sudoAsId) { void setSudoAsId(Long sudoAsId) {
this.sudoAsId = sudoAsId; this.sudoAsId = sudoAsId;
} }
...@@ -917,7 +917,8 @@ public class GitLabApiClient implements AutoCloseable { ...@@ -917,7 +917,8 @@ public class GitLabApiClient implements AutoCloseable {
// Ignore differences between given hostname and certificate hostname // Ignore differences between given hostname and certificate hostname
HostnameVerifier hostnameVerifier = new HostnameVerifier() { HostnameVerifier hostnameVerifier = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) { @Override
public boolean verify(String hostname, SSLSession session) {
return true; return true;
} }
}; };
......
...@@ -557,7 +557,7 @@ public class GroupApi extends AbstractApi { ...@@ -557,7 +557,7 @@ public class GroupApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Group addGroup(String name, String path, String description, Visibility visibility, 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() Form formData = new GitLabApiForm()
.withParam("name", name, true) .withParam("name", name, true)
...@@ -610,7 +610,7 @@ public class GroupApi extends AbstractApi { ...@@ -610,7 +610,7 @@ public class GroupApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Visibility visibility, 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() Form formData = new GitLabApiForm()
.withParam("name", name) .withParam("name", name)
...@@ -644,9 +644,10 @@ public class GroupApi extends AbstractApi { ...@@ -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, * @deprecated Will be removed in version 5.0, replaced by {@link #addGroup(String, String, String, Visibility,
* Boolean, Boolean, Integer)} * 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, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled,
Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { Long parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException {
Form formData = new GitLabApiForm() Form formData = new GitLabApiForm()
.withParam("name", name) .withParam("name", name)
...@@ -684,9 +685,10 @@ public class GroupApi extends AbstractApi { ...@@ -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, * @deprecated Will be removed in version 5.0, replaced by {@link #updateGroup(Object, String, String, String,
* Visibility, Boolean, Boolean, Integer)} * 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, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled,
Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException { Long parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiException {
Form formData = new GitLabApiForm() Form formData = new GitLabApiForm()
.withParam("name", name) .withParam("name", name)
...@@ -782,8 +784,8 @@ public class GroupApi extends AbstractApi { ...@@ -782,8 +784,8 @@ public class GroupApi extends AbstractApi {
* @return a member viewable by the authenticated user * @return a member viewable by the authenticated user
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Member getMember(Object groupIdOrPath, int userId) throws GitLabApiException { public Member getMember(Object groupIdOrPath, long userId) throws GitLabApiException {
return (getMember(groupIdOrPath, userId, false)); return (getMember(groupIdOrPath, userId, false));
} }
/** /**
...@@ -795,7 +797,7 @@ public class GroupApi extends AbstractApi { ...@@ -795,7 +797,7 @@ public class GroupApi extends AbstractApi {
* @param userId the member ID of the member to get * @param userId the member ID of the member to get
* @return a member viewable by the authenticated user as an Optional instance * @return a member viewable by the authenticated user as an Optional instance
*/ */
public Optional<Member> getOptionalMember(Object groupIdOrPath, int userId) { public Optional<Member> getOptionalMember(Object groupIdOrPath, long userId) {
try { try {
return (Optional.ofNullable(getMember(groupIdOrPath, userId, false))); return (Optional.ofNullable(getMember(groupIdOrPath, userId, false)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -814,7 +816,7 @@ public class GroupApi extends AbstractApi { ...@@ -814,7 +816,7 @@ public class GroupApi extends AbstractApi {
* @return the member specified by the project ID/user ID pair * @return the member specified by the project ID/user ID pair
* @throws GitLabApiException if any exception occurs * @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; Response response;
if (includeInherited) { if (includeInherited) {
response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", "all", userId); response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", "all", userId);
...@@ -834,7 +836,7 @@ public class GroupApi extends AbstractApi { ...@@ -834,7 +836,7 @@ public class GroupApi extends AbstractApi {
* @param includeInherited if true will the member even if inherited thru an ancestor group * @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 * @return the member specified by the group ID/user ID pair as the value of an Optional
*/ */
public Optional<Member> getOptionalMember(Object groupIdOrPath, Integer userId, Boolean includeInherited) { public Optional<Member> getOptionalMember(Object groupIdOrPath, Long userId, Boolean includeInherited) {
try { try {
return (Optional.ofNullable(getMember(groupIdOrPath, userId, includeInherited))); return (Optional.ofNullable(getMember(groupIdOrPath, userId, includeInherited)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -927,7 +929,7 @@ public class GroupApi extends AbstractApi { ...@@ -927,7 +929,7 @@ public class GroupApi extends AbstractApi {
* @return the group members viewable by the authenticated user, including inherited members through ancestor groups * @return the group members viewable by the authenticated user, including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Member> getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds) throws GitLabApiException { public List<Member> getAllMembers(Object groupIdOrPath, String query, List<Long> userIds) throws GitLabApiException {
return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).all()); return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).all());
} }
...@@ -946,7 +948,7 @@ public class GroupApi extends AbstractApi { ...@@ -946,7 +948,7 @@ public class GroupApi extends AbstractApi {
* including inherited members through ancestor groups * including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Member> getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds, int itemsPerPage) throws GitLabApiException { public Pager<Member> getAllMembers(Object groupIdOrPath, String query, List<Long> userIds, int itemsPerPage) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("query", query).withParam("user_ids", userIds); GitLabApiForm form = new GitLabApiForm().withParam("query", query).withParam("user_ids", userIds);
return (new Pager<Member>(this, Member.class, itemsPerPage, form.asMap(), return (new Pager<Member>(this, Member.class, itemsPerPage, form.asMap(),
"groups", getGroupIdOrPath(groupIdOrPath), "members", "all")); "groups", getGroupIdOrPath(groupIdOrPath), "members", "all"));
...@@ -966,7 +968,7 @@ public class GroupApi extends AbstractApi { ...@@ -966,7 +968,7 @@ public class GroupApi extends AbstractApi {
* including inherited members through ancestor groups * including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Member> getAllMembersStream(Object groupIdOrPath, String query, List<Integer> userIds) throws GitLabApiException { public Stream<Member> getAllMembersStream(Object groupIdOrPath, String query, List<Long> userIds) throws GitLabApiException {
return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).stream()); return (getAllMembers(groupIdOrPath, query, userIds, getDefaultPerPage()).stream());
} }
...@@ -981,7 +983,7 @@ public class GroupApi extends AbstractApi { ...@@ -981,7 +983,7 @@ public class GroupApi extends AbstractApi {
* @return a Member instance for the added user * @return a Member instance for the added user
* @throws GitLabApiException if any exception occurs * @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)); return (addMember(groupIdOrPath, userId, accessLevel, null));
} }
...@@ -996,7 +998,7 @@ public class GroupApi extends AbstractApi { ...@@ -996,7 +998,7 @@ public class GroupApi extends AbstractApi {
* @return a Member instance for the added user * @return a Member instance for the added user
* @throws GitLabApiException if any exception occurs * @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)); return (addMember(groupIdOrPath, userId, accessLevel.toValue(), null));
} }
...@@ -1012,7 +1014,7 @@ public class GroupApi extends AbstractApi { ...@@ -1012,7 +1014,7 @@ public class GroupApi extends AbstractApi {
* @return a Member instance for the added user * @return a Member instance for the added user
* @throws GitLabApiException if any exception occurs * @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)); return (addMember(groupIdOrPath, userId, accessLevel.toValue(), expiresAt));
} }
...@@ -1028,7 +1030,7 @@ public class GroupApi extends AbstractApi { ...@@ -1028,7 +1030,7 @@ public class GroupApi extends AbstractApi {
* @return a Member instance for the added user * @return a Member instance for the added user
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("user_id", userId, true) .withParam("user_id", userId, true)
...@@ -1049,7 +1051,7 @@ public class GroupApi extends AbstractApi { ...@@ -1049,7 +1051,7 @@ public class GroupApi extends AbstractApi {
* @return the updated member * @return the updated member
* @throws GitLabApiException if any exception occurs * @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)); return (updateMember(groupIdOrPath, userId, accessLevel, null));
} }
...@@ -1064,7 +1066,7 @@ public class GroupApi extends AbstractApi { ...@@ -1064,7 +1066,7 @@ public class GroupApi extends AbstractApi {
* @return the updated member * @return the updated member
* @throws GitLabApiException if any exception occurs * @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)); return (updateMember(groupIdOrPath, userId, accessLevel.toValue(), null));
} }
...@@ -1080,7 +1082,7 @@ public class GroupApi extends AbstractApi { ...@@ -1080,7 +1082,7 @@ public class GroupApi extends AbstractApi {
* @return the updated member * @return the updated member
* @throws GitLabApiException if any exception occurs * @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)); return (updateMember(groupIdOrPath, userId, accessLevel.toValue(), expiresAt));
} }
...@@ -1096,7 +1098,7 @@ public class GroupApi extends AbstractApi { ...@@ -1096,7 +1098,7 @@ public class GroupApi extends AbstractApi {
* @return the updated member * @return the updated member
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("access_level", accessLevel, true) .withParam("access_level", accessLevel, true)
.withParam("expires_at", expiresAt, false); .withParam("expires_at", expiresAt, false);
...@@ -1113,7 +1115,7 @@ public class GroupApi extends AbstractApi { ...@@ -1113,7 +1115,7 @@ public class GroupApi extends AbstractApi {
* @param userId the user ID of the member to remove * @param userId the user ID of the member to remove
* @throws GitLabApiException if any exception occurs * @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); Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", userId);
} }
...@@ -1398,7 +1400,7 @@ public class GroupApi extends AbstractApi { ...@@ -1398,7 +1400,7 @@ public class GroupApi extends AbstractApi {
* <pre><code>GitLab Endpoint: POST /groups/:id/projects/:project_id</code></pre> * <pre><code>GitLab Endpoint: POST /groups/:id/projects/:project_id</code></pre>
* *
* @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required * @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 * @return the transferred Project instance
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
*/ */
...@@ -1468,7 +1470,7 @@ public class GroupApi extends AbstractApi { ...@@ -1468,7 +1470,7 @@ public class GroupApi extends AbstractApi {
* @return the group Audit event * @return the group Audit event
* @throws GitLabApiException if any exception occurs * @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); Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class)); return (response.readEntity(AuditEvent.class));
} }
...@@ -1539,7 +1541,7 @@ public class GroupApi extends AbstractApi { ...@@ -1539,7 +1541,7 @@ public class GroupApi extends AbstractApi {
* @return the approved AccessRequest instance * @return the approved AccessRequest instance
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm formData = new GitLabApiForm().withParam("access_level", accessLevel);
Response response = this.putWithFormData(Response.Status.CREATED, formData, Response response = this.putWithFormData(Response.Status.CREATED, formData,
"groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId, "approve"); "groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId, "approve");
...@@ -1555,7 +1557,7 @@ public class GroupApi extends AbstractApi { ...@@ -1555,7 +1557,7 @@ public class GroupApi extends AbstractApi {
* @param userId the user ID to deny access for * @param userId the user ID to deny access for
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId); "groups", getGroupIdOrPath(groupIdOrPath), "access_requests", userId);
} }
...@@ -1584,7 +1586,7 @@ public class GroupApi extends AbstractApi { ...@@ -1584,7 +1586,7 @@ public class GroupApi extends AbstractApi {
* @return a Badge instance for the specified group/badge ID pair * @return a Badge instance for the specified group/badge ID pair
* @throws GitLabApiException if any exception occurs * @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); Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "badges", badgeId);
return (response.readEntity(Badge.class)); return (response.readEntity(Badge.class));
} }
...@@ -1598,7 +1600,7 @@ public class GroupApi extends AbstractApi { ...@@ -1598,7 +1600,7 @@ public class GroupApi extends AbstractApi {
* @param badgeId the ID of the badge to get * @param badgeId the ID of the badge to get
* @return an Optional instance with the specified badge as the value * @return an Optional instance with the specified badge as the value
*/ */
public Optional<Badge> getOptionalBadge(Object groupIdOrPath, Integer badgeId) { public Optional<Badge> getOptionalBadge(Object groupIdOrPath, Long badgeId) {
try { try {
return (Optional.ofNullable(getBadge(groupIdOrPath, badgeId))); return (Optional.ofNullable(getBadge(groupIdOrPath, badgeId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -1637,7 +1639,7 @@ public class GroupApi extends AbstractApi { ...@@ -1637,7 +1639,7 @@ public class GroupApi extends AbstractApi {
* @return a Badge instance for the editted badge * @return a Badge instance for the editted badge
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("link_url", linkUrl, false) .withParam("link_url", linkUrl, false)
.withParam("image_url", imageUrl, false); .withParam("image_url", imageUrl, false);
...@@ -1654,7 +1656,7 @@ public class GroupApi extends AbstractApi { ...@@ -1654,7 +1656,7 @@ public class GroupApi extends AbstractApi {
* @param badgeId the ID of the badge to remove * @param badgeId the ID of the badge to remove
* @throws GitLabApiException if any exception occurs * @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); delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "badges", badgeId);
} }
...@@ -1705,7 +1707,7 @@ public class GroupApi extends AbstractApi { ...@@ -1705,7 +1707,7 @@ public class GroupApi extends AbstractApi {
* @return a Group instance holding the details of the shared group * @return a Group instance holding the details of the shared group
* @throws GitLabApiException if any exception occurs * @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() GitLabApiForm formData = new GitLabApiForm()
.withParam("group_id", shareWithGroupId, true) .withParam("group_id", shareWithGroupId, true)
.withParam("group_access", groupAccess, true) .withParam("group_access", groupAccess, true)
...@@ -1723,7 +1725,7 @@ public class GroupApi extends AbstractApi { ...@@ -1723,7 +1725,7 @@ public class GroupApi extends AbstractApi {
* @param sharedWithGroupId the ID of the group to unshare with, required * @param sharedWithGroupId the ID of the group to unshare with, required
* @throws GitLabApiException if any exception occurs * @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, delete(Response.Status.NO_CONTENT, null,
"groups", getGroupIdOrPath(groupIdOrPath), "share", sharedWithGroupId); "groups", getGroupIdOrPath(groupIdOrPath), "share", sharedWithGroupId);
} }
...@@ -1733,7 +1735,7 @@ public class GroupApi extends AbstractApi { ...@@ -1733,7 +1735,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre>
* *
* @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 * @return a list of group's CustomAttributes
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -1746,7 +1748,7 @@ public class GroupApi extends AbstractApi { ...@@ -1746,7 +1748,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre>
* *
* @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 * @param itemsPerPage the number of items per page
* @return a Pager of group's custom attributes * @return a Pager of group's custom attributes
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -1761,7 +1763,7 @@ public class GroupApi extends AbstractApi { ...@@ -1761,7 +1763,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes</code></pre>
* *
* @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 * @return a Stream of group's custom attributes
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -1774,7 +1776,7 @@ public class GroupApi extends AbstractApi { ...@@ -1774,7 +1776,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes/:key</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes/:key</code></pre>
* *
* @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 key the key for the custom attribute
* @return a CustomAttribute instance for the specified key * @return a CustomAttribute instance for the specified key
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -1790,7 +1792,7 @@ public class GroupApi extends AbstractApi { ...@@ -1790,7 +1792,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes/:key</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/custom_attributes/:key</code></pre>
* *
* @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 * @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 * @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 { ...@@ -1808,7 +1810,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: PUT /groups/:id/custom_attributes/:key</code></pre> * <pre><code>GitLab Endpoint: PUT /groups/:id/custom_attributes/:key</code></pre>
* *
* @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 key the key for the custom attribute
* @param value the value for the customAttribute * @param value the value for the customAttribute
* @return a CustomAttribute instance for the updated or created custom attribute * @return a CustomAttribute instance for the updated or created custom attribute
...@@ -1834,7 +1836,7 @@ public class GroupApi extends AbstractApi { ...@@ -1834,7 +1836,7 @@ public class GroupApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: DELETE /groups/:id/custom_attributes/:key</code></pre> * <pre><code>GitLab Endpoint: DELETE /groups/:id/custom_attributes/:key</code></pre>
* *
* @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 * @param key the key of the custom attribute to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
...@@ -32,7 +32,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -32,7 +32,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @throws GitLabApiException if any exception occurs
*/ */
public void scheduleExport(Object projectIdOrPath) throws GitLabApiException { public void scheduleExport(Object projectIdOrPath) throws GitLabApiException {
...@@ -44,7 +44,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -44,7 +44,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 description overrides the project description, optional
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -57,7 +57,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -57,7 +57,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 description overrides the project description, optional
* @param upload Mao that contains the information to upload the exported project to a web server * @param upload Mao that contains the information to upload the exported project to a web server
* @param uploadUrl the URL to upload the project * @param uploadUrl the URL to upload the project
...@@ -81,7 +81,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -81,7 +81,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return an ExportStatus instance holding information on the export status
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -95,7 +95,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -95,7 +95,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @return a File instance pointing to the download of the project export file
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -109,7 +109,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -109,7 +109,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/export/download</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @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 * or to compute one from parameters
...@@ -251,7 +251,7 @@ public class ImportExportApi extends AbstractApi { ...@@ -251,7 +251,7 @@ public class ImportExportApi extends AbstractApi {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/import</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/import</code></pre>
* *
* @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 * @return an ImportStatus instance holding information on the import status
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
...@@ -90,7 +90,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -90,7 +90,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a list of project's issues
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -103,7 +103,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -103,7 +103,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 page the page to get
* @param perPage the number of issues per page * @param perPage the number of issues per page
* @return the list of issues in the specified range * @return the list of issues in the specified range
...@@ -119,7 +119,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -119,7 +119,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 * @param itemsPerPage the number of issues per page
* @return the Pager of issues in the specified range * @return the Pager of issues in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -133,7 +133,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -133,7 +133,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of 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 * @return a Stream of project's issues
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -146,7 +146,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -146,7 +146,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link IssueFilter} a IssueFilter instance with the filter settings
* @return the list of issues in the specified range. * @return the list of issues in the specified range.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -160,7 +160,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -160,7 +160,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link IssueFilter} a IssueFilter instance with the filter settings.
* @param page the page to get. * @param page the page to get.
* @param perPage the number of projects per page. * @param perPage the number of projects per page.
...@@ -178,7 +178,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -178,7 +178,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link IssueFilter} a IssueFilter instance with the filter settings.
* @param itemsPerPage the number of Project instances that will be fetched per page. * @param itemsPerPage the number of Project instances that will be fetched per page.
* @return the Pager of issues in the specified range. * @return the Pager of issues in the specified range.
...@@ -194,7 +194,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -194,7 +194,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 filter {@link IssueFilter} a IssueFilter instance with the filter settings
* @return a Stream of issues in the specified range. * @return a Stream of issues in the specified range.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -270,7 +270,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -270,7 +270,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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 * @return a List of issues for the specified group
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -283,7 +283,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -283,7 +283,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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. * @param itemsPerPage the number of Issue instances that will be fetched per page.
* @return the Pager of issues for the specified group * @return the Pager of issues for the specified group
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -297,7 +297,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -297,7 +297,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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 * @return a Stream of issues for the specified group and filter
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -310,7 +310,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -310,7 +310,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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 filter {@link IssueFilter} a IssueFilter instance with the filter settings.
* @return a List of issues for the specified group and filter * @return a List of issues for the specified group and filter
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -324,7 +324,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -324,7 +324,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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 filter {@link IssueFilter} a IssueFilter instance with the filter settings.
* @param itemsPerPage the number of Issue instances that will be fetched per page. * @param itemsPerPage the number of Issue instances that will be fetched per page.
* @return the Pager of issues for the specified group and filter * @return the Pager of issues for the specified group and filter
...@@ -341,7 +341,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -341,7 +341,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre> * <pre><code>GitLab Endpoint: GET /groups/:id/issues</code></pre>
* *
* @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 filter {@link IssueFilter} a IssueFilter instance with the filter settings.
* @return a Stream of issues for the specified group and filter * @return a Stream of issues for the specified group and filter
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -355,12 +355,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -355,12 +355,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return the specified Issue instance * @return the specified Issue instance
* @throws GitLabApiException if any exception occurs * @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(), Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid);
return (response.readEntity(Issue.class)); return (response.readEntity(Issue.class));
...@@ -371,11 +371,11 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -371,11 +371,11 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return the specified Issue as an Optional instance * @return the specified Issue as an Optional instance
*/ */
public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Integer issueIid) { public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Long issueIid) {
try { try {
return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid))); return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -388,7 +388,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -388,7 +388,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 title the title of an issue, required
* @param description the description of an issue, optional * @param description the description of an issue, optional
* @return an instance of Issue * @return an instance of Issue
...@@ -403,7 +403,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -403,7 +403,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 title the issue title of an issue, required
* @param description the description of an issue, optional * @param description the description of an issue, optional
* @param confidential set the issue to be confidential, default is false, optional * @param confidential set the issue to be confidential, default is false, optional
...@@ -419,8 +419,8 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -419,8 +419,8 @@ public class IssuesApi extends AbstractApi implements Constants {
* @return an instance of Issue * @return an instance of Issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List<Integer> assigneeIds, Integer milestoneId, String labels, public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List<Long> assigneeIds, Long milestoneId, String labels,
Date createdAt, Date dueDate, Integer mergeRequestToResolveId, Integer discussionToResolveId) throws GitLabApiException { Date createdAt, Date dueDate, Long mergeRequestToResolveId, Long discussionToResolveId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true) .withParam("title", title, true)
...@@ -442,12 +442,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -442,12 +442,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
* *
* @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 issueIid the issue IID to update, required
* @return an instance of the updated Issue * @return an instance of the updated Issue
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -463,7 +463,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -463,7 +463,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
* *
* @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 issueIid the issue IID to update, required
* @param title the title of an issue, optional * @param title the title of an issue, optional
* @param description the description of an issue, optional * @param description the description of an issue, optional
...@@ -477,8 +477,8 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -477,8 +477,8 @@ public class IssuesApi extends AbstractApi implements Constants {
* @return an instance of the updated Issue * @return an instance of the updated Issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Issue updateIssue(Object projectIdOrPath, Integer issueIid, String title, String description, Boolean confidential, List<Integer> assigneeIds, public Issue updateIssue(Object projectIdOrPath, Long issueIid, String title, String description, Boolean confidential, List<Long> assigneeIds,
Integer milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException { Long milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException {
if (issueIid == null) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -503,13 +503,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -503,13 +503,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
* *
* @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 issueIid the issue IID to update, required
* @param assigneeId the ID of the user to assign issue to, required * @param assigneeId the ID of the user to assign issue to, required
* @return an instance of the updated Issue * @return an instance of the updated Issue
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -525,11 +525,11 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -525,11 +525,11 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid</code></pre> * <pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid</code></pre>
* *
* @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 issueIid the internal ID of a project's issue
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -544,13 +544,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -544,13 +544,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre>
* *
* @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 issueIid the internal ID of a project's issue
* @param duration estimated time in seconds * @param duration estimated time in seconds
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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))); return (estimateTime(projectIdOrPath, issueIid, new Duration(duration)));
} }
...@@ -559,13 +559,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -559,13 +559,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre>
* *
* @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 issueIid the internal ID of a project's issue
* @param duration Human readable format, e.g. 3h30m * @param duration Human readable format, e.g. 3h30m
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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))); return (estimateTime(projectIdOrPath, issueIid, new Duration(duration)));
} }
...@@ -574,13 +574,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -574,13 +574,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @param duration set the estimate of time to this duration * @param duration set the estimate of time to this duration
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -599,12 +599,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -599,12 +599,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_time_estimate</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_time_estimate</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -620,13 +620,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -620,13 +620,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @param duration the duration in seconds * @param duration the duration in seconds
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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))); return (addSpentTime(projectIdOrPath, issueIid, new Duration(duration)));
} }
...@@ -635,13 +635,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -635,13 +635,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @param duration Human readable format, e.g. 3h30m * @param duration Human readable format, e.g. 3h30m
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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))); return (addSpentTime(projectIdOrPath, issueIid, new Duration(duration)));
} }
...@@ -650,13 +650,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -650,13 +650,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @param duration the duration of time spent * @param duration the duration of time spent
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -675,12 +675,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -675,12 +675,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_spent_time</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_spent_time</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return a TimeSTats instance * @return a TimeSTats instance
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -696,12 +696,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -696,12 +696,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return a TimeStats instance * @return a TimeStats instance
* @throws GitLabApiException if any exception occurs * @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) { if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null"); throw new RuntimeException("issue IID cannot be null");
...@@ -717,11 +717,11 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -717,11 +717,11 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @return a TimeStats as an Optional instance * @return a TimeStats as an Optional instance
*/ */
public Optional<TimeStats> getOptionalTimeTrackingStats(Object projectIdOrPath, Integer issueIid) { public Optional<TimeStats> getOptionalTimeTrackingStats(Object projectIdOrPath, Long issueIid) {
try { try {
return (Optional.ofNullable(getTimeTrackingStats(projectIdOrPath, issueIid))); return (Optional.ofNullable(getTimeTrackingStats(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
...@@ -739,7 +739,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -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. * @return a List containing all the merge requests what will close the issue when merged.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).all()); return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).all());
} }
...@@ -755,7 +755,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -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. * @return a List containing all the merge requests what will close the issue when merged.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by");
return (response.readEntity(new GenericType<List<MergeRequest>>() { })); return (response.readEntity(new GenericType<List<MergeRequest>>() { }));
...@@ -772,7 +772,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -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 * @return a Pager containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { public Pager<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null, return new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by");
} }
...@@ -787,7 +787,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -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. * @return a List containing all the merge requests what will close the issue when merged.
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<MergeRequest> getClosedByMergeRequestsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public Stream<MergeRequest> getClosedByMergeRequestsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
} }
...@@ -799,12 +799,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -799,12 +799,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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) * @return a list of related issues of a given issue, sorted by the relationship creation datetime (ascending)
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Issue> getIssueLinks(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<Issue> getIssueLinks(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).all()); return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).all());
} }
...@@ -816,13 +816,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -816,13 +816,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue
* @param itemsPerPage the number of issues per page * @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) * @return a Pager of related issues of a given issue, sorted by the relationship creation datetime (ascending)
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Issue> getIssueLinks(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { public Pager<Issue> getIssueLinks(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null, return (new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links")); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links"));
} }
...@@ -835,12 +835,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -835,12 +835,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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) * @return a Stream of related issues of a given issue, sorted by the relationship creation datetime (ascending)
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Issue> getIssueLinksStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public Stream<Issue> getIssueLinksStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); return (getIssueLinks(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
} }
...@@ -851,15 +851,15 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -851,15 +851,15 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 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 * @param targetIssueIid the internal ID of a target project’s issue
* @return an instance of IssueLink holding the link relationship * @return an instance of IssueLink holding the link relationship
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public IssueLink createIssueLink(Object projectIdOrPath, Integer issueIid, public IssueLink createIssueLink(Object projectIdOrPath, Long issueIid,
Object targetProjectIdOrPath, Integer targetIssueIid) throws GitLabApiException { Object targetProjectIdOrPath, Long targetIssueIid) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm()
.withParam("target_project_id", getProjectIdOrPath(targetProjectIdOrPath), true) .withParam("target_project_id", getProjectIdOrPath(targetProjectIdOrPath), true)
...@@ -877,13 +877,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -877,13 +877,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links/:issue_link_id</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links/:issue_link_id</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the internal ID of a project's issue, required
* @param issueLinkId the ID of an issue relationship, required * @param issueLinkId the ID of an issue relationship, required
* @return an instance of IssueLink holding the deleted link relationship * @return an instance of IssueLink holding the deleted link relationship
* @throws GitLabApiException if any exception occurs * @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, Response response = delete(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links", issueLinkId); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "links", issueLinkId);
return (response.readEntity(IssueLink.class)); return (response.readEntity(IssueLink.class));
...@@ -894,12 +894,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -894,12 +894,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the IID of the issue to get the participants for
* @return a List containing all participants for the specified issue * @return a List containing all participants for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Participant> getParticipants(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public List<Participant> getParticipants(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).all()); return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).all());
} }
...@@ -908,14 +908,14 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -908,14 +908,14 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the IID of the issue to get the participants for
* @param page the page to get * @param page the page to get
* @param perPage the number of projects per page * @param perPage the number of projects per page
* @return a List containing all participants for the specified issue * @return a List containing all participants for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Participant> getParticipants(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException { public List<Participant> getParticipants(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants");
return (response.readEntity(new GenericType<List<Participant>>() { })); return (response.readEntity(new GenericType<List<Participant>>() { }));
...@@ -926,13 +926,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -926,13 +926,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the IID of the issue to get the participants for
* @param itemsPerPage the number of Participant instances that will be fetched per page * @param itemsPerPage the number of Participant instances that will be fetched per page
* @return a Pager containing all participants for the specified issue * @return a Pager containing all participants for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Participant> getParticipants(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException { public Pager<Participant> getParticipants(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Participant>(this, Participant.class, itemsPerPage, null, return new Pager<Participant>(this, Participant.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants"); "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "participants");
} }
...@@ -942,12 +942,12 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -942,12 +942,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants</code></pre>
* *
* @param projectIdOrPath the project in the form of an 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 issueIid the IID of the issue to get the participants for
* @return a Stream containing all participants for the specified issue * @return a Stream containing all participants for the specified issue
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException { public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).stream()); return (getParticipants(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
} }
...@@ -988,7 +988,7 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -988,7 +988,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: GET /projects/:projectId/issues_statistics</code></pre> * <pre><code>GitLab Endpoint: GET /projects/:projectId/issues_statistics</code></pre>
* *
* @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. * @param filter {@link IssuesStatisticsFilter} a IssuesStatisticsFilter instance with the filter settings.
* @return an IssuesStatistics instance with the statistics for the matched issues * @return an IssuesStatistics instance with the statistics for the matched issues
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -1009,13 +1009,13 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -1009,13 +1009,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* *
* <pre><code>GitLab Endpoint: POST /projects/:projectId/issues/:issue_iid/move</code></pre> * <pre><code>GitLab Endpoint: POST /projects/:projectId/issues/:issue_iid/move</code></pre>
* *
* @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 issueIid the IID of the issue to move
* @param toProjectId the ID of the project to move the issue to * @param toProjectId the ID of the project to move the issue to
* @return an Issue instance for the moved issue * @return an Issue instance for the moved issue
* @throws GitLabApiException if any exception occurs * @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); GitLabApiForm formData = new GitLabApiForm().withParam("to_project_id", toProjectId, true);
Response response = post(Response.Status.OK, formData, Response response = post(Response.Status.OK, formData,
"projects", this.getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "move"); "projects", this.getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "move");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment