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
......@@ -201,7 +201,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a single job for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
*/
public Job getJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job getJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId);
return (response.readEntity(Job.class));
}
......@@ -215,7 +215,7 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the job ID to get
* @return a single job for the specified project ID as an Optional intance
*/
public Optional<Job> getOptionalJob(Object projectIdOrPath, Integer jobId) {
public Optional<Job> getOptionalJob(Object projectIdOrPath, Long jobId) {
try {
return (Optional.ofNullable(getJob(projectIdOrPath, jobId)));
} catch (GitLabApiException glae) {
......@@ -293,7 +293,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified job artifacts file
* @throws GitLabApiException if any exception occurs
*/
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException {
public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, File directory) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
......@@ -324,7 +324,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified job artifacts file
* @throws GitLabApiException if any exception occurs
*/
public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
return (response.readEntity(InputStream.class));
......@@ -344,7 +344,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified artifacts file
* @throws GitLabApiException if any exception occurs
*/
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException {
public File downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename());
......@@ -378,7 +378,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified artifacts file from
* @throws GitLabApiException if any exception occurs
*/
public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile) throws GitLabApiException {
public InputStream downloadArtifactsFile(Object projectIdOrPath, Long jobId, ArtifactsFile artifactsFile) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", artifactsFile.getFilename());
return (response.readEntity(InputStream.class));
......@@ -398,7 +398,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a File instance pointing to the download of the specified artifacts file
* @throws GitLabApiException if any exception occurs
*/
public File downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath, File directory) throws GitLabApiException {
public File downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath, File directory) throws GitLabApiException {
String path = artifactPath.toString().replace("\\", "/");
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
......@@ -433,7 +433,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return an InputStream to read the specified artifacts file from
* @throws GitLabApiException if any exception occurs
*/
public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException {
public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Long jobId, Path artifactPath) throws GitLabApiException {
String path = artifactPath.toString().replace("\\", "/");
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", path);
......@@ -451,7 +451,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return a String containing the specified job's trace
* @throws GitLabApiException if any exception occurs during execution
*/
public String getTrace(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public String getTrace(Object projectIdOrPath, Long jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace");
return (response.readEntity(String.class));
......@@ -469,7 +469,7 @@ public class JobApi extends AbstractApi implements Constants {
* @deprecated replaced by {@link #cancelJob(Object, Integer)}
*/
@Deprecated
public Job cancleJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job cancleJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
return (cancelJob(projectIdOrPath, jobId));
}
......@@ -483,7 +483,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
*/
public Job cancelJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job cancelJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel");
return (response.readEntity(Job.class));
......@@ -499,7 +499,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just retried
* @throws GitLabApiException if any exception occurs during execution
*/
public Job retryJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job retryJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "retry");
return (response.readEntity(Job.class));
......@@ -515,7 +515,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just erased
* @throws GitLabApiException if any exception occurs during execution
*/
public Job eraseJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job eraseJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "erase");
return (response.readEntity(Job.class));
......@@ -531,7 +531,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return job instance which just played
* @throws GitLabApiException if any exception occurs during execution
*/
public Job playJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job playJob(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play");
return (response.readEntity(Job.class));
......@@ -547,7 +547,7 @@ public class JobApi extends AbstractApi implements Constants {
* @return the Job instance that was just modified
* @throws GitLabApiException if any exception occurs during execution
*/
public Job keepArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public Job keepArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "keep");
return (response.readEntity(Job.class));
......@@ -562,7 +562,7 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the ID to delete artifacts for
* @throws GitLabApiException if any exception occurs during execution
*/
public void deleteArtifacts(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
public void deleteArtifacts(Object projectIdOrPath, Long jobId) throws GitLabApiException {
delete(Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
}
}
......@@ -24,7 +24,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of project's labels
* @throws GitLabApiException if any exception occurs
*/
......@@ -35,7 +35,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Pager of all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of items per page
* @return a list of project's labels in the specified range
* @throws GitLabApiException if any exception occurs
......@@ -48,7 +48,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Stream of all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a Stream of project's labels
* @throws GitLabApiException if any exception occurs
*/
......@@ -59,8 +59,8 @@ public class LabelsApi extends AbstractApi {
/**
* Get a single project label.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Label instance holding the information for the group label
* @throws GitLabApiException if any exception occurs
*/
......@@ -73,8 +73,8 @@ public class LabelsApi extends AbstractApi {
/**
* Get a single project label as the value of an Optional.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Optional instance with a Label instance as its value
* @throws GitLabApiException if any exception occurs
*/
......@@ -101,7 +101,7 @@ public class LabelsApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /groups/:id/labels</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 labelProperties a Label instance holding the properties for the new group label
* @return the created Label instance
* @throws GitLabApiException if any exception occurs
......@@ -126,8 +126,8 @@ public class LabelsApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/labels/:label_id</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @param labelConfig a Label instance holding the label properties to update
* @return the updated Label instance
* @throws GitLabApiException if any exception occurs
......@@ -142,8 +142,8 @@ public class LabelsApi extends AbstractApi {
/**
* Delete the specified project label.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @throws GitLabApiException if any exception occurs
*/
public void deleteProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException {
......@@ -153,8 +153,8 @@ public class LabelsApi extends AbstractApi {
/**
* Subscribe a specified project label.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
*/
......@@ -167,8 +167,8 @@ public class LabelsApi extends AbstractApi {
/**
* Unsubscribe a specified project label.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
*/
......@@ -181,7 +181,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get all labels of the specified group.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @return a list of group's labels
* @throws org.gitlab4j.api.GitLabApiException if any exception occurs
*/
......@@ -192,7 +192,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Pager of all labels of the specified group.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param itemsPerPage the number of items per page
* @return a list of group's labels in the specified range
* @throws GitLabApiException if any exception occurs
......@@ -205,7 +205,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Stream of all labels of the specified group.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @return a Stream of group's labels
* @throws GitLabApiException if any exception occurs
*/
......@@ -216,8 +216,8 @@ public class LabelsApi extends AbstractApi {
/**
* Get a single group label.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Label instance holding the information for the group label
* @throws GitLabApiException if any exception occurs
*/
......@@ -230,8 +230,8 @@ public class LabelsApi extends AbstractApi {
/**
* Get a single group label as the value of an Optional.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return a Optional instance with a Label instance as its value
* @throws GitLabApiException if any exception occurs
*/
......@@ -256,7 +256,7 @@ public class LabelsApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /groups/:id/labels</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 labelProperties a Label instance holding the properties for the new group label
* @return the created Label instance
* @throws GitLabApiException if any exception occurs
......@@ -281,8 +281,8 @@ public class LabelsApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /groups/:id/labels/:label_id</code></pre>
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @param labelConfig a Label instance holding the label properties to update
* @return the updated Label instance
* @throws GitLabApiException if any exception occurs
......@@ -297,8 +297,8 @@ public class LabelsApi extends AbstractApi {
/**
* Delete the specified label
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @throws GitLabApiException if any exception occurs
*/
public void deleteGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException {
......@@ -308,8 +308,8 @@ public class LabelsApi extends AbstractApi {
/**
* Subscribe a specified group label.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
*/
......@@ -322,8 +322,8 @@ public class LabelsApi extends AbstractApi {
/**
* Unsubscribe a specified group label.
*
* @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Integer(ID), String(name), or Label instance
* @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance
* @param labelIdOrName the label in the form of an Long(ID), String(name), or Label instance
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
*/
......@@ -337,7 +337,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of project's labels
* @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #getProjectLabels(Object)} method.
......@@ -350,7 +350,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get all labels of the specified project to using the specified page and per page setting
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param page the page to get
* @param perPage the number of items per page
* @return a list of project's labels in the specified range
......@@ -367,7 +367,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Pager of all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of items per page
* @return a list of project's labels in the specified range
* @throws GitLabApiException if any exception occurs
......@@ -382,7 +382,7 @@ public class LabelsApi extends AbstractApi {
/**
* Get a Stream of all labels of the specified project.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a Stream of project's labels
* @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #getProjectLabelsStream(Object)} method.
......@@ -395,7 +395,7 @@ public class LabelsApi extends AbstractApi {
/**
* Create a label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param color the color for the label
* @param description the description for the label
......@@ -411,7 +411,7 @@ public class LabelsApi extends AbstractApi {
/**
* Create a label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param color the color for the label
* @return the created Label instance
......@@ -426,7 +426,7 @@ public class LabelsApi extends AbstractApi {
/**
* Create a label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param color the color for the label
* @param priority the priority for the label
......@@ -442,7 +442,7 @@ public class LabelsApi extends AbstractApi {
/**
* Create a label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param color the color for the label
* @param description the description for the label
......@@ -464,7 +464,7 @@ public class LabelsApi extends AbstractApi {
/**
* Update the specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param newName the new name for the label
* @param description the description for the label
......@@ -481,7 +481,7 @@ public class LabelsApi extends AbstractApi {
/**
* Update the specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param color the color for the label
* @param description the description for the label
......@@ -498,7 +498,7 @@ public class LabelsApi extends AbstractApi {
/**
* Update the specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @param newName the new name for the label
* @param color the color for the label
......@@ -524,7 +524,7 @@ public class LabelsApi extends AbstractApi {
/**
* Delete the specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param name the name for the label
* @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #deleteProjectLabel(Object, Object)} method.
......@@ -538,28 +538,28 @@ public class LabelsApi extends AbstractApi {
/**
* Subscribe a specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelId the label ID
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #subscribeProjectLabel(Object, Object)} method.
*/
@Deprecated
public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException {
public Label subscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException {
return (subscribeProjectLabel(projectIdOrPath, labelId));
}
/**
* Unsubscribe a specified label
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param labelId the label ID
* @return HttpStatusCode 503
* @throws GitLabApiException if any exception occurs
* @deprecated Replaced by the {@link #unsubscribeProjectLabel(Object, Object)} method.
*/
@Deprecated
public Label unsubscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException {
public Label unsubscribeLabel(Object projectIdOrPath, Long labelId) throws GitLabApiException {
return (unsubscribeProjectLabel(projectIdOrPath, labelId));
}
}
......@@ -20,7 +20,7 @@ public class LicenseApi extends AbstractApi {
/**
* Retrieve information about the current license.
*
*
* <pre><code>GitLab Endpoint: GET /license</code></pre>
*
* @return a License instance holding info about the current license
......@@ -108,7 +108,7 @@ public class LicenseApi extends AbstractApi {
* @return a License instance for the delete license
* @throws GitLabApiException if any exception occurs
*/
public License deleteLicense(Integer licenseId) throws GitLabApiException {
public License deleteLicense(Long licenseId) throws GitLabApiException {
Response response = delete(Response.Status.OK, null, "license", licenseId);
return (response.readEntity(License.class));
}
......
......@@ -122,7 +122,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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
* @return all merge requests for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -135,7 +135,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 page the page to get
* @param perPage the number of MergeRequest instances per page
* @return all merge requests for the specified project
......@@ -151,7 +151,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 itemsPerPage the number of MergeRequest instances that will be fetched per page
* @return all merge requests for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -165,7 +165,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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
* @return a Stream with all merge requests for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -178,7 +178,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests?state=:state</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 state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all).
* @return all merge requests for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -192,7 +192,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all).
* @param page the page to get
* @param perPage the number of MergeRequest instances per page
......@@ -213,7 +213,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all).
* @param itemsPerPage the number of MergeRequest instances that will be fetched per page
* @return all merge requests for the specified project
......@@ -230,7 +230,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests?state=:state</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 state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all).
* @return a Stream with all the merge requests for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -246,12 +246,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request
* @return the specified MergeRequest instance
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest getMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return getMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null);
}
......@@ -260,7 +260,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request
* @param renderHtml if true response includes rendered HTML for title and description, can be null
* @param includeDivergedCommitCount if true response includes the commits behind the target branch, can be null
......@@ -268,7 +268,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a MergeRequest instance as specified by the parameters
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
public MergeRequest getMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
Boolean renderHtml, Boolean includeDivergedCommitCount, Boolean includeRebaseInProgress) throws GitLabApiException {
GitLabApiForm queryParams = new GitLabApiForm()
......@@ -288,11 +288,11 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request
* @return the specified MergeRequest as an Optional instance instance
*/
public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) {
public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Long mergeRequestIid) {
return getOptionalMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null);
}
......@@ -303,14 +303,14 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request
* @param renderHtml if true response includes rendered HTML for title and description, can be null
* @param includeDivergedCommitCount if true response includes the commits behind the target branch, can be null
* @param includeRebaseInProgress if true response includes whether a rebase operation is in progress, can be null
* @return the specified MergeRequest as an Optional instance instance
*/
public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
Boolean renderHtml, Boolean includeDivergedCommitCount , Boolean includeRebaseInProgress) {
try {
return (Optional.ofNullable(getMergeRequest(projectIdOrPath, mergeRequestIid, renderHtml, includeDivergedCommitCount, includeRebaseInProgress)));
......@@ -326,7 +326,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/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 mergeRequestIid the internal ID of the merge request
* @return a list containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
......@@ -342,7 +342,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/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 mergeRequestIid the internal ID of the merge request
* @param page the page to get
* @param perPage the number of commits per page
......@@ -362,7 +362,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/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 mergeRequestIid the internal ID of the merge request
* @param itemsPerPage the number of Commit instances that will be fetched per page
* @return a Pager containing the commits for the specified merge request
......@@ -380,7 +380,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/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 mergeRequestIid the internal ID of the merge request
* @return a Stream containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
......@@ -394,12 +394,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions</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 mergeRequestIid the internal ID of the merge request
* @return a List of merge request diff versions for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public List<MergeRequestDiff> getMergeRequestDiffs(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<MergeRequestDiff> getMergeRequestDiffs(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestDiffs(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -408,13 +408,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions</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 mergeRequestIid the internal ID of the merge request
* @param itemsPerPage the number of MergeRequest instances that will be fetched per page
* @return a Pager of merge request diff versions for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Pager<MergeRequestDiff> getMergeRequestDiffs(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<MergeRequestDiff> getMergeRequestDiffs(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<MergeRequestDiff>(this, MergeRequestDiff.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "versions"));
}
......@@ -424,12 +424,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions</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 mergeRequestIid the internal ID of the merge request
* @return a Stream of merge request diff versions for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Stream<MergeRequestDiff> getMergeRequestDiffsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<MergeRequestDiff> getMergeRequestDiffsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestDiffs(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......@@ -438,14 +438,14 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_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 mergeRequestIid the internal ID of the merge request
* @param versionId the ID of the merge request diff version
* @return a MergeRequestDiff instance for the specified MR diff version
* @throws GitLabApiException if any exception occurs
*/
public MergeRequestDiff getMergeRequestDiff(Object projectIdOrPath,
Integer mergeRequestIid, Integer versionId) throws GitLabApiException {
Long mergeRequestIid, Long versionId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "versions", versionId);
return (response.readEntity(MergeRequestDiff.class));
......@@ -456,13 +456,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_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 mergeRequestIid the internal ID of the merge request
* @param versionId the ID of the merge request diff version
* @return the specified MergeRequestDiff as an Optional instance instance
*/
public Optional<MergeRequestDiff> getOptionalMergeRequestDiff(
Object projectIdOrPath, Integer mergeRequestIid, Integer versionId) {
Object projectIdOrPath, Long mergeRequestIid, Long versionId) {
try {
return (Optional.ofNullable(getMergeRequestDiff(projectIdOrPath, mergeRequestIid, versionId)));
} catch (GitLabApiException glae) {
......@@ -475,7 +475,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/: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 params a MergeRequestParams instance holding the info to create the merge request
* @return the created MergeRequest instance
* @throws GitLabApiException if any exception occurs
......@@ -492,7 +492,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/: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 sourceBranch the source branch, required
* @param targetBranch the target branch, required
* @param title the title for the merge request, required
......@@ -507,8 +507,8 @@ public class MergeRequestApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
* @since GitLab Starter 8.17, GitLab CE 11.0.
*/
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId,
Integer targetProjectId, String[] labels, Integer milestoneId, Boolean removeSourceBranch, Boolean squash) throws GitLabApiException {
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId,
Long targetProjectId, String[] labels, Long milestoneId, Boolean removeSourceBranch, Boolean squash) throws GitLabApiException {
MergeRequestParams params = new MergeRequestParams()
.withSourceBranch(sourceBranch)
......@@ -530,7 +530,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/: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 sourceBranch the source branch, required
* @param targetBranch the target branch, required
* @param title the title for the merge request, required
......@@ -543,8 +543,8 @@ public class MergeRequestApi extends AbstractApi {
* @return the created MergeRequest instance
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId,
Integer targetProjectId, String[] labels, Integer milestoneId, Boolean removeSourceBranch) throws GitLabApiException {
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId,
Long targetProjectId, String[] labels, Long milestoneId, Boolean removeSourceBranch) throws GitLabApiException {
MergeRequestParams params = new MergeRequestParams()
.withSourceBranch(sourceBranch)
......@@ -565,7 +565,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/: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 sourceBranch the source branch, required
* @param targetBranch the target branch, required
* @param title the title for the merge request, required
......@@ -574,7 +574,7 @@ public class MergeRequestApi extends AbstractApi {
* @return the created MergeRequest instance
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId)
public MergeRequest createMergeRequest(Object projectIdOrPath, String sourceBranch, String targetBranch, String title, String description, Long assigneeId)
throws GitLabApiException {
MergeRequestParams params = new MergeRequestParams()
......@@ -592,13 +592,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request to update
* @param params a MergeRequestParams instance holding the info to update the merge request
* @return the updated merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest updateMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, MergeRequestParams params) throws GitLabApiException {
public MergeRequest updateMergeRequest(Object projectIdOrPath, Long mergeRequestIid, MergeRequestParams params) throws GitLabApiException {
GitLabApiForm form = params.getForm(false);
Response response = put(Response.Status.OK, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid);
......@@ -612,7 +612,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request to update
* @param targetBranch the target branch, optional
* @param title the title for the merge request
......@@ -630,9 +630,9 @@ public class MergeRequestApi extends AbstractApi {
* @return the updated merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest updateMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
String targetBranch, String title, Integer assigneeId, String description,
StateEvent stateEvent, String labels, Integer milestoneId, Boolean removeSourceBranch,
public MergeRequest updateMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
String targetBranch, String title, Long assigneeId, String description,
StateEvent stateEvent, String labels, Long milestoneId, Boolean removeSourceBranch,
Boolean squash, Boolean discussionLocked, Boolean allowCollaboration)
throws GitLabApiException {
......@@ -664,11 +664,11 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request
* @throws GitLabApiException if any exception occurs
*/
public void deleteMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public void deleteMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -690,13 +690,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge</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 mergeRequestIid the internal ID of the merge request
* @param params the MergeRequest instance holding the parameters for accepting the merge request
* @return the merged merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
AcceptMergeRequestParams params) throws GitLabApiException {
Response response = put(Response.Status.OK, params.getForm().asMap(), "projects",
getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "merge");
......@@ -715,12 +715,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge</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 mergeRequestIid the internal ID of the merge request
* @return the merged merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null, null));
}
......@@ -737,7 +737,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge</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 mergeRequestIid the internal ID of the merge request
* @param mergeCommitMessage, custom merge commit message, optional
* @param shouldRemoveSourceBranch, if true removes the source branch, optional
......@@ -745,7 +745,7 @@ public class MergeRequestApi extends AbstractApi {
* @return the merged merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds)
throws GitLabApiException {
return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, mergeCommitMessage,
......@@ -765,7 +765,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/merge</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 mergeRequestIid the internal ID of the merge request
* @param mergeCommitMessage, custom merge commit message, optional
* @param shouldRemoveSourceBranch, if true removes the source branch, optional
......@@ -774,7 +774,7 @@ public class MergeRequestApi extends AbstractApi {
* @return the merged merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid,
public MergeRequest acceptMergeRequest(Object projectIdOrPath, Long mergeRequestIid,
String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds, String sha)
throws GitLabApiException {
......@@ -804,12 +804,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds</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 mergeRequestIid the internal ID of the merge request
* @return the updated merge request
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest cancelMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -826,12 +826,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approvals</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 mergeRequestIid the internal ID of the merge request
* @return a MergeRequest instance with approval information included
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getMergeRequestApprovals(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest getMergeRequestApprovals(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getApprovals(projectIdOrPath, mergeRequestIid));
}
......@@ -842,12 +842,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approvals</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 mergeRequestIid the internal ID of the merge request
* @return a MergeRequest instance with approval information included
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getApprovals(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest getApprovals(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -863,12 +863,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_state</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 mergeRequestIid the internal ID of the merge request
* @return a ApprovalState instance with approval state
* @throws GitLabApiException if any exception occurs
*/
public ApprovalState getApprovalState(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public ApprovalState getApprovalState(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -885,12 +885,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules</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 mergeRequestIid the internal ID of the merge request
* @return a List of ApprovalRule instances for the specified merge request.
* @throws GitLabApiException if any exception occurs
*/
public List<ApprovalRule> getApprovalRules(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<ApprovalRule> getApprovalRules(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getApprovalRules(projectIdOrPath, mergeRequestIid, -1).all());
}
......@@ -900,13 +900,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules</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 mergeRequestIid the internal ID of the merge request
* @param itemsPerPage the number of ApprovalRule instances that will be fetched per page
* @return a Pager of ApprovalRule instances for the specified merge request.
* @throws GitLabApiException if any exception occurs
*/
public Pager<ApprovalRule> getApprovalRules(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<ApprovalRule> getApprovalRules(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -922,12 +922,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/approval_rules</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 mergeRequestIid the internal ID of the merge request
* @return a Stream of ApprovalRule instances for the specified merge request.
* @throws GitLabApiException if any exception occurs
*/
public Stream<ApprovalRule> getApprovalRulesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<ApprovalRule> getApprovalRulesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getApprovalRules(projectIdOrPath, mergeRequestIid, -1).stream());
}
......@@ -937,15 +937,15 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/approval_rules</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 mergeRequestIid the internal ID of the merge request
* @param projectRuleId the ID of a project-level approval rule
* @param params the ApprovalRuleParams instance holding the parameters for the approval rule
* @return a ApprovalRule instance with approval configuration
* @throws GitLabApiException if any exception occurs
*/
public ApprovalRule createApprovalRule(Object projectIdOrPath, Integer mergeRequestIid,
Integer projectRuleId, ApprovalRuleParams params) throws GitLabApiException {
public ApprovalRule createApprovalRule(Object projectIdOrPath, Long mergeRequestIid,
Long projectRuleId, ApprovalRuleParams params) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -964,15 +964,15 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_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 mergeRequestIid the internal ID of the merge request
* @param approvalRuleId the ID of the approval rule
* @param params the ApprovalRuleParams instance holding the parameters for the approval rule update
* @return a ApprovalRule instance with approval configuration
* @throws GitLabApiException if any exception occurs
*/
public ApprovalRule updateApprovalRule(Object projectIdOrPath, Integer mergeRequestIid,
Integer approvalRuleId, ApprovalRuleParams params) throws GitLabApiException {
public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long mergeRequestIid,
Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -994,12 +994,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rule_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 mergeRequestIid the internal ID of the merge request
* @param approvalRuleId the ID of the approval rule
* @throws GitLabApiException if any exception occurs
*/
public void deleteApprovalRule(Object projectIdOrPath, Integer mergeRequestIid, Integer approvalRuleId) throws GitLabApiException {
public void deleteApprovalRule(Object projectIdOrPath, Long mergeRequestIid, Long approvalRuleId) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -1020,13 +1020,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/approve</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 mergeRequestIid the internal ID of the merge request
* @param sha the HEAD of the merge request, optional
* @return a MergeRequest instance with approval information included
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest approveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, String sha) throws GitLabApiException {
public MergeRequest approveMergeRequest(Object projectIdOrPath, Long mergeRequestIid, String sha) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -1044,12 +1044,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/unapprove</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 mergeRequestIid the internal ID of the merge request
* @return a MergeRequest instance with approval information included
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......@@ -1064,12 +1064,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/changes</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 mergeRequestIid the IID of the merge request to get
* @return a merge request including its changes
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getMergeRequestChanges(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest getMergeRequestChanges(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "changes");
return (response.readEntity(MergeRequest.class));
}
......@@ -1079,12 +1079,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the IID of the merge request to get
* @return a List containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public List<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<Participant> getParticipants(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -1093,14 +1093,14 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the IID of the merge request to get
* @param page the page to get
* @param perPage the number of projects per page
* @return a List containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public List<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException {
public List<Participant> getParticipants(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants");
return (response.readEntity(new GenericType<List<Participant>>() { }));
......@@ -1111,13 +1111,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the IID of the merge request to get
* @param itemsPerPage the number of Participant instances that will be fetched per page
* @return a Pager containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Pager<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<Participant> getParticipants(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Participant>(this, Participant.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants");
}
......@@ -1127,12 +1127,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the IID of the merge request to get
* @return a Stream containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......@@ -1146,7 +1146,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a List containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs
*/
public List<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<Issue> getClosesIssues(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -1162,7 +1162,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a List containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs
*/
public List<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException {
public List<Issue> getClosesIssues(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues");
return (response.readEntity(new GenericType<List<Issue>>() { }));
......@@ -1179,8 +1179,8 @@ public class MergeRequestApi extends AbstractApi {
* @return a Pager containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs
*/
public Pager<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Issue>(this, Issue.class, itemsPerPage, null,
public Pager<Issue> getClosesIssues(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues");
}
......@@ -1194,7 +1194,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a Stream containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs
*/
public Stream<Issue> getClosesIssuesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<Issue> getClosesIssuesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......@@ -1208,7 +1208,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a List containing all the issues that would be closed by merging the provided merge request
* @throws GitLabApiException if any exception occurs
*/
public List<Issue> getApprovalStatus(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<Issue> getApprovalStatus(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -1220,12 +1220,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/rebase</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 mergeRequestIid the internal ID of the merge request to rebase
* @return the merge request info containing the status of a merge request rebase
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest rebaseMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest rebaseMergeRequest(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Response response = put(Response.Status.ACCEPTED, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "rebase");
return (response.readEntity(MergeRequest.class));
......@@ -1236,12 +1236,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_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 mergeRequestIid the internal ID of the merge request being rebased
* @return the merge request info containing the status of a merge request rebase
* @throws GitLabApiException if any exception occurs
*/
public MergeRequest getRebaseStatus(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public MergeRequest getRebaseStatus(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return getMergeRequest(projectIdOrPath, mergeRequestIid, null, null, true);
}
......@@ -1250,12 +1250,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines</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 mergeRequestIid the internal ID of the merge request
* @return a list containing the pipelines for the specified merge request
* @throws GitLabApiException if any exception occurs during execution
*/
public List<Pipeline> getMergeRequestPipelines(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<Pipeline> getMergeRequestPipelines(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestPipelines(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -1264,13 +1264,13 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines</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 mergeRequestIid the internal ID of the merge request
* @param itemsPerPage the number of Pipeline instances that will be fetched per page
* @return a Pager containing the pipelines for the specified merge request
* @throws GitLabApiException if any exception occurs during execution
*/
public Pager<Pipeline> getMergeRequestPipelines(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<Pipeline> getMergeRequestPipelines(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Pipeline>(this, Pipeline.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "pipelines"));
}
......@@ -1280,12 +1280,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/pipelines</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 mergeRequestIid the internal ID of the merge request
* @return a Stream containing the pipelines for the specified merge request
* @throws GitLabApiException if any exception occurs during execution
*/
public Stream<Pipeline> getMergeRequestPipelinesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<Pipeline> getMergeRequestPipelinesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestPipelines(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......@@ -1300,12 +1300,12 @@ public class MergeRequestApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/pipelines</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 mergeRequestIid the internal ID of the merge request
* @return a Pipeline instance with the newly created pipeline info
* @throws GitLabApiException if any exception occurs during execution
*/
public Pipeline createMergeRequestPipeline(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Pipeline createMergeRequestPipeline(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
Response response = post(Response.Status.CREATED, (Form)null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "pipelines");
return (response.readEntity(Pipeline.class));
......
......@@ -28,7 +28,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 the milestones associated with the specified group
* @throws GitLabApiException if any exception occurs
*/
......@@ -41,7 +41,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 page the page number to get
* @param perPage how many milestones per page
* @return the milestones associated with the specified group
......@@ -58,7 +58,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 Milestone instances that will be fetched per page
* @return the milestones associated with the specified group
* @throws GitLabApiException if any exception occurs
......@@ -73,7 +73,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 the milestones associated with the specified group
* @throws GitLabApiException if any exception occurs
*/
......@@ -86,7 +86,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 state the milestone state
* @return the milestones associated with the specified group and state
* @throws GitLabApiException if any exception occurs
......@@ -103,7 +103,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones</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 search the search string
* @return the milestones associated with the specified group
* @throws GitLabApiException if any exception occurs
......@@ -120,7 +120,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_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 state the milestone state
* @param search the search string
* @return the milestones associated with the specified group
......@@ -141,12 +141,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_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 milestoneId the ID of the milestone tp get
* @return a Milestone instance for the specified IDs
* @throws GitLabApiException if any exception occurs
*/
public Milestone getGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone getGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
......@@ -157,12 +157,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @return a List of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public List<Issue> getGroupIssues(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public List<Issue> getGroupIssues(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
return (getGroupIssues(groupIdOrPath, milestoneId, getDefaultPerPage()).all());
}
......@@ -171,13 +171,13 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @param itemsPerPage The number of Milestone instances that will be fetched per page
* @return a Pager of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public Pager<Issue> getGroupIssues(Object groupIdOrPath, Integer milestoneId, int itemsPerPage) throws GitLabApiException {
public Pager<Issue> getGroupIssues(Object groupIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "issues"));
}
......@@ -187,12 +187,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @return a Stream of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public Stream<Issue> getGroupIssuesStream(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public Stream<Issue> getGroupIssuesStream(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
return (getGroupIssues(groupIdOrPath, milestoneId, getDefaultPerPage()).stream());
}
......@@ -201,12 +201,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/merge_requests</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 milestoneId the milestone ID to get the merge requests for
* @return a list of merge requests associated with the specified milestone
* @throws GitLabApiException if any exception occurs
*/
public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
......@@ -217,7 +217,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /groups/:id/milestones</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 title the title for the milestone
* @param description the description for the milestone
* @param dueDate the due date for the milestone
......@@ -240,12 +240,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to close
* @return the closed Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone closeGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
......@@ -262,12 +262,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to activate
* @return the activated Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone activateGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone activateGroupMilestone(Object groupIdOrPath, Long milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
......@@ -284,7 +284,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /groups/:id/milestones/:milestone_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 milestoneId the milestone ID to update
* @param title the updated title for the milestone
* @param description the updated description for the milestone
......@@ -294,7 +294,7 @@ public class MilestonesApi extends AbstractApi {
* @return the updated Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone updateGroupMilestone(Object groupIdOrPath, Integer milestoneId, String title, String description,
public Milestone updateGroupMilestone(Object groupIdOrPath, Long milestoneId, String title, String description,
Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException {
if (milestoneId == null) {
......@@ -317,7 +317,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 the milestones associated with the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -330,7 +330,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 number to get
* @param perPage how many milestones per page
* @return the milestones associated with the specified project
......@@ -347,7 +347,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 Milestone instances that will be fetched per page
* @return the milestones associated with the specified project
* @throws GitLabApiException if any exception occurs
......@@ -362,7 +362,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 the milestones associated with the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -375,7 +375,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 state the milestone state
* @return the milestones associated with the specified project and state
* @throws GitLabApiException if any exception occurs
......@@ -392,7 +392,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 search the search string
* @return the milestones associated with the specified project
* @throws GitLabApiException if any exception occurs
......@@ -409,7 +409,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones</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 state the milestone state
* @param search the search string
* @return the milestones associated with the specified project
......@@ -430,12 +430,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones/:milestone_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 milestoneId the ID of the milestone tp get
* @return a Milestone instance for the specified IDs
* @throws GitLabApiException if any exception occurs
*/
public Milestone getMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone getMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
......@@ -446,12 +446,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @return a List of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public List<Issue> getIssues(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public List<Issue> getIssues(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
return (getIssues(projectIdOrPath, milestoneId, getDefaultPerPage()).all());
}
......@@ -460,13 +460,13 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @param itemsPerPage the number of Milestone instances that will be fetched per page
* @return a Pager of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public Pager<Issue> getIssues(Object projectIdOrPath, Integer milestoneId, int itemsPerPage) throws GitLabApiException {
public Pager<Issue> getIssues(Object projectIdOrPath, Long milestoneId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "issues"));
}
......@@ -476,12 +476,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to get the issues for
* @return a Stream of Issue for the milestone
* @throws GitLabApiException if any exception occurs
*/
public Stream<Issue> getIssuesStream(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public Stream<Issue> getIssuesStream(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
return (getIssues(projectIdOrPath, milestoneId, getDefaultPerPage()).stream());
}
......@@ -489,13 +489,13 @@ public class MilestonesApi extends AbstractApi {
* Get the list of merge requests associated with the specified milestone.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to get the merge requests for
* @return a list of merge requests associated with the specified milestone
* @throws GitLabApiException if any exception occurs
*/
public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
......@@ -506,7 +506,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/milestones</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 for the milestone
* @param description the description for the milestone
* @param dueDate the due date for the milestone
......@@ -530,12 +530,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to close
* @return the closed Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone closeMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone closeMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
......@@ -552,12 +552,12 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to activate
* @return the activated Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public Milestone activateMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
......@@ -574,7 +574,7 @@ public class MilestonesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/milestones/:milestone_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 milestoneId the milestone ID to update
* @param title the updated title for the milestone
* @param description the updated description for the milestone
......@@ -584,13 +584,13 @@ public class MilestonesApi extends AbstractApi {
* @return the updated Milestone instance
* @throws GitLabApiException if any exception occurs
*/
public Milestone updateMilestone(Object projectIdOrPath, Integer milestoneId, String title, String description,
public Milestone updateMilestone(Object projectIdOrPath, Long milestoneId, String title, String description,
Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
}
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("description", description)
......@@ -605,11 +605,11 @@ public class MilestonesApi extends AbstractApi {
/**
* Delete a project milestone.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param milestoneId the milestone ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
public void deleteMilestone(Object projectIdOrPath, Long milestoneId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
}
}
......@@ -20,14 +20,14 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue ID to get the notes for
* @return a list of the issues's notes
* @throws GitLabApiException if any exception occurs
* @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer)}
*/
@Deprecated
public List<Note> getNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public List<Note> getNotes(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueNotes(projectIdOrPath, issueIid));
}
......@@ -36,7 +36,7 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue IID to get the notes for
* @param page the page to get
* @param perPage the number of notes per page
......@@ -45,7 +45,7 @@ public class NotesApi extends AbstractApi {
* @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer, int, int)}
*/
@Deprecated
public List<Note> getNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException {
public List<Note> getNotes(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException {
return (getIssueNotes(projectIdOrPath, issueIid, page, perPage));
}
......@@ -54,7 +54,7 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue IID to get the notes for
* @param itemsPerPage the number of notes per page
* @return the list of notes in the specified range
......@@ -62,7 +62,7 @@ public class NotesApi extends AbstractApi {
* @deprecated As of release 4.7.0, replaced by {@link #getIssueNotes(Object, Integer, int)}
*/
@Deprecated
public Pager<Note> getNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
public Pager<Note> getNotes(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (getIssueNotes(projectIdOrPath, issueIid, itemsPerPage));
}
......@@ -71,12 +71,12 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue ID to get the notes for
* @return a list of the issues's notes
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getIssueNotes(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public List<Note> getIssueNotes(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueNotes(projectIdOrPath, issueIid, getDefaultPerPage()).all());
}
......@@ -85,14 +85,14 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue IID to get the notes for
* @param page the page to get
* @param perPage the number of notes per page
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getIssueNotes(Object projectIdOrPath, Integer issueIid, int page, int perPage) throws GitLabApiException {
public List<Note> getIssueNotes(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),"projects",
getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes");
return (response.readEntity(new GenericType<List<Note>>() {}));
......@@ -103,13 +103,13 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue IID to get the notes for
* @param itemsPerPage the number of notes per page
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public Pager<Note> getIssueNotes(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
public Pager<Note> getIssueNotes(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Note>(this, Note.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes"));
}
......@@ -119,25 +119,25 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes</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 issue ID to get the notes for
* @return a Stream of the issues's notes
* @throws GitLabApiException if any exception occurs
*/
public Stream<Note> getIssueNotesStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public Stream<Note> getIssueNotesStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueNotes(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
}
/**
* Get the specified issues's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param issueIid the issue IID to get the notes for
* @param noteId the ID of the Note to get
* @return a Note instance for the specified IDs
* @throws GitLabApiException if any exception occurs
*/
public Note getIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException {
public Note getIssueNote(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", noteId);
return (response.readEntity(Note.class));
......@@ -145,27 +145,27 @@ public class NotesApi extends AbstractApi {
/**
* Create a issues's note.
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for
* @param issueIid the issue IID to create the notes for
* @param body the content of note
* @return the created Note instance
* @throws GitLabApiException if any exception occurs
*/
public Note createIssueNote(Object projectIdOrPath, Integer issueIid, String body) throws GitLabApiException {
public Note createIssueNote(Object projectIdOrPath, Long issueIid, String body) throws GitLabApiException {
return (createIssueNote(projectIdOrPath, issueIid, body, null));
}
/**
* Create a issues's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param issueIid the issue IID to create the notes for
* @param body the content of note
* @param createdAt the created time of note
* @return the created Note instance
* @throws GitLabApiException if any exception occurs
*/
public Note createIssueNote(Object projectIdOrPath, Integer issueIid, String body, Date createdAt) throws GitLabApiException {
public Note createIssueNote(Object projectIdOrPath, Long issueIid, String body, Date createdAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("body", body, true)
......@@ -178,14 +178,14 @@ public class NotesApi extends AbstractApi {
/**
* Update the specified issues's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param issueIid the issue IID to update the notes for
* @param noteId the ID of the node to update
* @param body the update content for the Note
* @return the modified Note instance
* @throws GitLabApiException if any exception occurs
*/
public Note updateIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId, String body) throws GitLabApiException {
public Note updateIssueNote(Object projectIdOrPath, Long issueIid, Long noteId, String body) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true);
Response response = put(Response.Status.OK, formData.asMap(),
......@@ -196,12 +196,12 @@ public class NotesApi extends AbstractApi {
/**
* Delete the specified issues's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param issueIid the issue IID to delete the notes for
* @param noteId the ID of the node to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteIssueNote(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException {
public void deleteIssueNote(Object projectIdOrPath, Long issueIid, Long noteId) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issueIid cannot be null");
......@@ -221,12 +221,12 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the issue ID to get the notes for
* @return a list of the merge request's notes
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, getDefaultPerPage()).all());
}
......@@ -235,14 +235,14 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the issue ID to get the notes for
* @param sortOrder return merge request notes sorted in the specified sort order, default is DESC
* @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
* @return a list of the merge request's notes
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException {
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, sortOrder, orderBy, getDefaultPerPage()).all());
}
......@@ -251,14 +251,14 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the merge request IID to get the notes for
* @param page the page to get
* @param perPage the number of notes per page
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int page, int perPage) throws GitLabApiException {
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, page, perPage));
}
......@@ -267,7 +267,7 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the merge request IID to get the notes for
* @param sortOrder return merge request notes sorted in the specified sort order, default is DESC
* @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
......@@ -276,7 +276,7 @@ public class NotesApi extends AbstractApi {
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid,
public List<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid,
SortOrder sortOrder, Note.OrderBy orderBy, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
......@@ -294,13 +294,13 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the merge request IID to get the notes for
* @param itemsPerPage the number of notes per page
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public Pager<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, itemsPerPage));
}
......@@ -309,12 +309,12 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the issue ID to get the notes for
* @return a Stream of the merge request's notes
* @throws GitLabApiException if any exception occurs
*/
public Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, null, null, getDefaultPerPage()).stream());
}
......@@ -323,7 +323,7 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the merge request IID to get the notes for
* @param sortOrder return merge request notes sorted in the specified sort order, default is DESC
* @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
......@@ -331,7 +331,7 @@ public class NotesApi extends AbstractApi {
* @return the list of notes in the specified range
* @throws GitLabApiException if any exception occurs
*/
public Pager<Note> getMergeRequestNotes(Object projectIdOrPath, Integer mergeRequestIid,
public Pager<Note> getMergeRequestNotes(Object projectIdOrPath, Long mergeRequestIid,
SortOrder sortOrder, Note.OrderBy orderBy, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
......@@ -348,27 +348,27 @@ public class NotesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes</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 mergeRequestIid the issue ID to get the notes for
* @param sortOrder return merge request notes sorted in the specified sort order, default is DESC
* @param orderBy return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
* @return a Stream of the merge request's notes
* @throws GitLabApiException if any exception occurs
*/
public Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException {
public Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, Long mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, sortOrder, orderBy, getDefaultPerPage()).stream());
}
/**
* Get the specified merge request's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param mergeRequestIid the merge request IID to get the notes for
* @param noteId the ID of the Note to get
* @return a Note instance for the specified IDs
* @throws GitLabApiException if any exception occurs
*/
public Note getMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException {
public Note getMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes", noteId);
return (response.readEntity(Note.class));
......@@ -377,13 +377,13 @@ public class NotesApi extends AbstractApi {
/**
* Create a merge request's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param mergeRequestIid the merge request IID to create the notes for
* @param body the content of note
* @return the created Note instance
* @throws GitLabApiException if any exception occurs
*/
public Note createMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, String body) throws GitLabApiException {
public Note createMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, String body) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true);
Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "notes");
......@@ -393,14 +393,14 @@ public class NotesApi extends AbstractApi {
/**
* Update the specified merge request's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param mergeRequestIid the merge request IID to update the notes for
* @param noteId the ID of the node to update
* @param body the update content for the Note
* @return the modified Note instance
* @throws GitLabApiException if any exception occurs
*/
public Note updateMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, String body) throws GitLabApiException {
public Note updateMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId, String body) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("body", body, true);
Response response = put(Response.Status.OK, formData.asMap(),
......@@ -411,12 +411,12 @@ public class NotesApi extends AbstractApi {
/**
* Delete the specified merge request's note.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param mergeRequestIid the merge request IID to delete the notes for
* @param noteId the ID of the node to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteMergeRequestNote(Object projectIdOrPath, Integer mergeRequestIid, Integer noteId) throws GitLabApiException {
public void deleteMergeRequestNote(Object projectIdOrPath, Long mergeRequestIid, Long noteId) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
......
......@@ -13,7 +13,7 @@ public class NotificationSettingsApi extends AbstractApi {
/**
* Get the global notification settings.
*
*
* <pre><code>GitLab Endpoint: GET /notification_settings</code></pre>
*
* @return a NotificationSettings instance containing the global notification settings
......@@ -26,7 +26,7 @@ public class NotificationSettingsApi extends AbstractApi {
/**
* Update the global notification settings.
*
*
* <pre><code>GitLab Endpoint: PUT /notification_settings</code></pre>
*
* @param settings a NotificationSettings instance with the new settings
......@@ -37,7 +37,7 @@ public class NotificationSettingsApi extends AbstractApi {
GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel())
.withParam("email", settings.getEmail());
.withParam("email", settings.getEmail());
Events events = settings.getEvents();
if (events != null) {
......@@ -61,21 +61,21 @@ public class NotificationSettingsApi extends AbstractApi {
/**
* Get the notification settings for a group.
*
*
* <pre><code>GitLab Endpoint: GET /groups/:id/notification_settings</code></pre>
*
* @param groupId the group ID to get the notification settings for
* @return a NotificationSettings instance containing the specified group's notification settings
* @throws GitLabApiException if any exception occurs
*/
public NotificationSettings getGroupNotificationSettings(int groupId) throws GitLabApiException {
public NotificationSettings getGroupNotificationSettings(long groupId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings");
return (response.readEntity(NotificationSettings.class));
}
/**
* Update the notification settings for a group
*
*
* <pre><code>GitLab Endpoint: PUT /groups/:id/notification_settings</code></pre>
*
* @param groupId the group ID to update the notification settings for
......@@ -83,11 +83,11 @@ public class NotificationSettingsApi extends AbstractApi {
* @return a NotificationSettings instance containing the updated group notification settings
* @throws GitLabApiException if any exception occurs
*/
public NotificationSettings updateGroupNotificationSettings(int groupId, NotificationSettings settings) throws GitLabApiException {
public NotificationSettings updateGroupNotificationSettings(long groupId, NotificationSettings settings) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel())
.withParam("email", settings.getEmail());
.withParam("email", settings.getEmail());
Events events = settings.getEvents();
if (events != null) {
......@@ -111,21 +111,21 @@ public class NotificationSettingsApi extends AbstractApi {
/**
* Get the notification settings for a project.
*
*
* <pre><code>GitLab Endpoint: GET /projects/:id/notification_settings</code></pre>
*
* @param projectId the project ID to get the notification settings for
* @return a NotificationSettings instance containing the specified project's notification settings
* @throws GitLabApiException if any exception occurs
*/
public NotificationSettings getProjectNotificationSettings(int projectId) throws GitLabApiException {
public NotificationSettings getProjectNotificationSettings(long projectId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings");
return (response.readEntity(NotificationSettings.class));
}
/**
* Update the notification settings for a project
*
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/notification_settings</code></pre>
*
* @param projectId the project ID to update the notification settings for
......@@ -137,7 +137,7 @@ public class NotificationSettingsApi extends AbstractApi {
GitLabApiForm formData = new GitLabApiForm()
.withParam("level", settings.getLevel())
.withParam("email", settings.getEmail());
.withParam("email", settings.getEmail());
Events events = settings.getEvents();
if (events != null) {
......
......@@ -52,7 +52,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 packages
* @throws GitLabApiException if any exception occurs
*/
......@@ -66,7 +66,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 perPage the number of Package instances per page
* @return a list of project packages for the specified range
......@@ -84,7 +84,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 Package instances per page
* @return a Pager of project packages for the specified range
* @throws GitLabApiException if any exception occurs
......@@ -99,7 +99,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 the PackageFilter instance holding the filter values for the query
* @param itemsPerPage the number of Package instances per page
* @return a Pager of project packages for the specified range
......@@ -117,7 +117,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 packages
* @throws GitLabApiException if any exception occurs
*/
......@@ -131,7 +131,7 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 the PackageFilter instance holding the filter values for the query
* @return a Stream of pages in the project's packages
* @throws GitLabApiException if any exception occurs
......@@ -145,12 +145,12 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_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 packageId the ID of the package to get
* @return a Package instance for the specified package ID
* @throws GitLabApiException if any exception occurs
*/
public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
public Package getPackage(Object projectIdOrPath, Long packageId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId);
return (response.readEntity(Package.class));
......@@ -161,12 +161,12 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</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 packageId the ID of the package to get the package files for
* @return a list of PackageFile instances for the specified package ID
* @throws GitLabApiException if any exception occurs
*/
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Long packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all());
}
......@@ -175,14 +175,14 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</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 packageId the ID of the package to get the package files for
* @param page the page to get
* @param perPage the number of PackageFile instances per page
* @return a list of PackageFile instances for the specified package ID
* @throws GitLabApiException if any exception occurs
*/
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException {
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Long packageId, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files");
return response.readEntity(new GenericType<List<PackageFile>>() {});
......@@ -193,13 +193,13 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</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 packageId the ID of the package to get the package files for
* @param itemsPerPage the number of PackageFile instances per page
* @return a Pager of PackageFile instances for the specified package ID
* @throws GitLabApiException if any exception occurs
*/
public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException {
public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Long packageId, int itemsPerPage) throws GitLabApiException {
return (new Pager<PackageFile>(this, PackageFile.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files"));
}
......@@ -209,12 +209,12 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</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 packageId the ID of the package to get the package files for
* @return a Stream of PackageFile instances for the specified package ID
* @throws GitLabApiException if any exception occurs
*/
public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Long packageId) throws GitLabApiException {
return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream());
}
......@@ -223,11 +223,11 @@ public class PackagesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/packages/:package_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 packageId the ID of the package to delete
* @throws GitLabApiException if any exception occurs
*/
public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException {
public void deletePackage(Object projectIdOrPath, Long packageId) throws GitLabApiException {
if (packageId == null) {
throw new RuntimeException("packageId cannot be null");
......
......@@ -34,7 +34,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 pipelines for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
*/
......@@ -47,7 +47,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 perPage the number of Pipeline instances per page
* @return a list containing the pipelines for the specified project ID in the specified page range
......@@ -64,7 +64,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 Pipeline instances that will be fetched per page
* @return a Pager containing the pipelines for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
......@@ -79,7 +79,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 pipelines for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
*/
......@@ -92,7 +92,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 a PipelineFilter instance used to filter the results
* @return a list containing the pipelines for the specified project ID and matching the provided filter
* @throws GitLabApiException if any exception occurs during execution
......@@ -106,7 +106,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 a PipelineFilter instance used to filter the results
* @param itemsPerPage the number of Pipeline instances that will be fetched per page
* @return a Pager containing the pipelines for the specified project ID and matching the provided filter
......@@ -123,7 +123,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 a PipelineFilter instance used to filter the results
* @return a Stream containing the pipelines for the specified project ID and matching the provided filter
* @throws GitLabApiException if any exception occurs during execution
......@@ -137,7 +137,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
* @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
* @param ref the ref of pipelines
......@@ -161,7 +161,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
* @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
* @param ref the ref of pipelines
......@@ -199,7 +199,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
* @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
* @param ref the ref of pipelines
......@@ -223,7 +223,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines</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 scope the scope of pipelines, one of: RUNNING, PENDING, FINISHED, BRANCHES, TAGS
* @param status the status of pipelines, one of: RUNNING, PENDING, SUCCESS, FAILED, CANCELED, SKIPPED
* @param ref the ref of pipelines
......@@ -257,12 +257,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_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 pipelineId the pipeline ID to get
* @return a single pipelines for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
*/
public Pipeline getPipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
public Pipeline getPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
return (response.readEntity(Pipeline.class));
}
......@@ -272,7 +272,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipeline</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 reference to commit
* @return a Pipeline instance with the newly created pipeline info
* @throws GitLabApiException if any exception occurs during execution
......@@ -286,7 +286,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipeline</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 reference to commit
* @param variables a Map containing the variables available in the pipeline
* @return a Pipeline instance with the newly created pipeline info
......@@ -301,7 +301,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipeline</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 reference to commit
* @param variables a Map containing the variables available in the pipeline
* @return a Pipeline instance with the newly created pipeline info
......@@ -342,11 +342,11 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_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 pipelineId the pipeline ID to delete
* @throws GitLabApiException if any exception occurs during execution
*/
public void deletePipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
public void deletePipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
delete(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
}
......@@ -355,12 +355,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/retry</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 pipelineId the pipeline ID to retry a job from
* @return pipeline instance which just retried
* @throws GitLabApiException if any exception occurs during execution
*/
public Pipeline retryPipelineJob(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
public Pipeline retryPipelineJob(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "retry");
return (response.readEntity(Pipeline.class));
......@@ -371,12 +371,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/cancel</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 pipelineId the pipeline ID to cancel jobs
* @return pipeline instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
*/
public Pipeline cancelPipelineJobs(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
public Pipeline cancelPipelineJobs(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "cancel");
return (response.readEntity(Pipeline.class));
......@@ -387,7 +387,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedules</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a list of pipeline schedules for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -400,7 +400,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedules</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param page the page to get
* @param perPage the number of PipelineSchedule instances per page
* @return a list of project pipeline_schedules for the specified project in the specified page range
......@@ -416,7 +416,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedule</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param itemsPerPage the number of PipelineSchedule instances that will be fetched per page
* @return a Pager of project pipeline_schedules for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -430,7 +430,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedule</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a Stream of project pipeline schedules for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -443,12 +443,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the ID of the pipeline schedule to get
* @return the project PipelineSchedule
* @throws GitLabApiException if any exception occurs
*/
public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId);
return (response.readEntity(PipelineSchedule.class));
}
......@@ -458,11 +458,11 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the ID of the hook to get
* @return the project PipelineSchedule as an Optional instance
*/
public Optional<PipelineSchedule> getOptionalPipelineSchedule (Object projectIdOrPath, Integer pipelineScheduleId) {
public Optional<PipelineSchedule> getOptionalPipelineSchedule (Object projectIdOrPath, Long pipelineScheduleId) {
try {
return (Optional.ofNullable(getPipelineSchedule(projectIdOrPath, pipelineScheduleId)));
} catch (GitLabApiException glae) {
......@@ -475,7 +475,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>POST /projects/:id/pipeline_schedules</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineSchedule a PipelineSchedule instance to create
* @return the added PipelineSchedule instance
* @throws GitLabApiException if any exception occurs
......@@ -498,11 +498,11 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the project schedule ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deletePipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
public void deletePipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId);
}
......@@ -512,7 +512,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineSchedule the pipelineSchedule instance that contains the pipelineSchedule info to modify
* @return the modified project schedule
* @throws GitLabApiException if any exception occurs
......@@ -535,12 +535,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the pipelineSchedule instance id that ownership has to be taken of
* @return the modified project schedule
* @throws GitLabApiException if any exception occurs
*/
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException {
Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership");
return (response.readEntity(PipelineSchedule.class));
......@@ -551,14 +551,14 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the pipelineSchedule ID
* @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed
* @param value the value for the variable
* @return a Pipeline instance with the newly created pipeline schedule variable
* @throws GitLabApiException if any exception occurs during execution
*/
public Variable createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId,
public Variable createPipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId,
String key, String value) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
......@@ -574,14 +574,14 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the pipelineSchedule ID
* @param key the key of an existing pipeline schedule variable
* @param value the new value for the variable
* @return a Pipeline instance with the updated variable
* @throws GitLabApiException if any exception occurs during execution
*/
public Variable updatePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId,
public Variable updatePipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId,
String key, String value) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("value", value, true);
......@@ -595,12 +595,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineScheduleId the pipeline schedule ID
* @param key the key of an existing pipeline schedule variable
* @throws GitLabApiException if any exception occurs
*/
public void deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key) throws GitLabApiException {
public void deletePipelineScheduleVariable(Object projectIdOrPath, Long pipelineScheduleId, String key) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath),
"pipeline_schedules", pipelineScheduleId, "variables", key);
......@@ -611,7 +611,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/triggers</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a list of pipeline triggers for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -624,7 +624,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/triggers</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param page the page to get
* @param perPage the number of Trigger instances per page
* @return a list of project pipeline triggers for the specified project in the specified page range
......@@ -640,7 +640,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedule</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param itemsPerPage the number of Project instances that will be fetched per page
* @return a Pager of project pipeline triggers for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -654,7 +654,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipeline_schedule</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a Stream of project pipeline triggers for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -667,12 +667,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/triggers/:trigger_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param triggerId the ID of the trigger to get
* @return the project pipeline trigger
* @throws GitLabApiException if any exception occurs
*/
public Trigger getPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException {
public Trigger getPipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId);
return (response.readEntity(Trigger.class));
}
......@@ -682,11 +682,11 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/triggers/:trigger_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param triggerId the ID of the trigger to get
* @return the project pipeline trigger as an Optional instance
*/
public Optional<Trigger> getOptionalPipelineTrigger(Object projectIdOrPath, Integer triggerId) {
public Optional<Trigger> getOptionalPipelineTrigger(Object projectIdOrPath, Long triggerId) {
try {
return (Optional.ofNullable(getPipelineTrigger(projectIdOrPath, triggerId)));
} catch (GitLabApiException glae) {
......@@ -699,7 +699,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>POST /projects/:id/triggers</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param description the trigger description
* @return the created Trigger instance
* @throws GitLabApiException if any exception occurs
......@@ -715,13 +715,13 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>PUT /projects/:id/triggers/:trigger_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param triggerId the trigger ID to update
* @param description the new trigger description
* @return the updated Trigger instance
* @throws GitLabApiException if any exception occurs
*/
public Trigger updatePipelineTrigger(Object projectIdOrPath, Integer triggerId, String description) throws GitLabApiException {
public Trigger updatePipelineTrigger(Object projectIdOrPath, Long triggerId, String description) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("description", description, false);
Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId);
return (response.readEntity(Trigger.class));
......@@ -732,11 +732,11 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>DELETE /projects/:id/triggers/:trigger_id</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param triggerId the project trigger ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deletePipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException {
public void deletePipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId);
}
......@@ -745,12 +745,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>PUT /projects/:id/triggers/:trigger_id/take_ownership</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param triggerId the trigger ID to take opwnership of
* @return the updated Trigger instance
* @throws GitLabApiException if any exception occurs
*/
public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Integer triggerId) throws GitLabApiException {
public Trigger takeOwnewrshipOfPipelineTrigger(Object projectIdOrPath, Long triggerId) throws GitLabApiException {
Response response = put(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "triggers", triggerId, "take_ownership");
return (response.readEntity(Trigger.class));
......@@ -761,7 +761,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>POST /projects/:id/trigger/pipeline</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param trigger the Trigger instance holding the trigger token
* @param ref the ref that the pipeline is to be triggered for
* @param variables a List of variables to be passed with the trigger
......@@ -782,7 +782,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>POST /projects/:id/trigger/pipeline</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param token the trigger token
* @param ref the ref that the pipeline is to be triggered for
* @param variables a List of variables to be passed with the trigger
......@@ -804,12 +804,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineId the pipeline ID
* @return a List of pipeline variables
* @throws GitLabApiException if any exception occurs
*/
public List<Variable> getPipelineVariables(Object projectIdOrPath, Integer pipelineId) throws GitLabApiException {
public List<Variable> getPipelineVariables(Object projectIdOrPath, Long pipelineId) throws GitLabApiException {
return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).all());
}
......@@ -818,14 +818,14 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineId the pipeline ID
* @param itemsPerPage the number of Pipeline instances that will be fetched per page
* @return a Pager of pipeline variables
* @throws GitLabApiException if any exception occurs
*/
public Pager<Variable> getPipelineVariables(Object projectIdOrPath, Integer pipelineId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Variable>(this, Variable.class, itemsPerPage, null,
public Pager<Variable> getPipelineVariables(Object projectIdOrPath, Long pipelineId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Variable>(this, Variable.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "variables"));
}
......@@ -834,12 +834,12 @@ public class PipelineApi extends AbstractApi implements Constants {
*
* <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pipelineId the pipeline ID
* @return a Stream of pipeline variables
* @throws GitLabApiException if any exception occurs
*/
public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Integer pipelineId) throws GitLabApiException {
public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long pipelineId) throws GitLabApiException {
return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream());
}
}
......@@ -90,7 +90,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /project/:id/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
* @return a ProjectFetches instance with the project fetch statistics for the last 30 days
* @throws GitLabApiException if any exception occurs during execution
*/
......@@ -104,7 +104,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /project/:id/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
* @return an Optional instance with the value for the project fetch statistics for the last 30 day
*/
public Optional<ProjectFetches> getOptionalProjectStatistics(Object projectIdOrPath) {
......@@ -670,7 +670,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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
* @return the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -683,7 +683,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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
* @return an Optional instance with the specified project as a value
*/
public Optional<Project> getOptionalProject(Object projectIdOrPath) {
......@@ -699,7 +699,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 includeStatistics include project statistics
* @return the specified project
* @throws GitLabApiException if any exception occurs
......@@ -713,7 +713,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 includeStatistics include project statistics
* @return an Optional instance with the specified project as a value
*/
......@@ -730,7 +730,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 includeStatistics include project statistics
* @param includeLicense include project license data
* @param withCustomAttributes include custom attributes in response (admins only)
......@@ -753,7 +753,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/: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 includeStatistics include project statistics
* @param includeLicense include project license data
* @param withCustomAttributes include custom attributes in response (admins only)
......@@ -876,7 +876,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return the created project
* @throws GitLabApiException if any exception occurs
*/
public Project createProject(Integer namespaceId, String projectName) throws GitLabApiException {
public Project createProject(Long namespaceId, String projectName) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("namespace_id", namespaceId).withParam("name", projectName, true);
Response response = post(Response.Status.CREATED, formData, "projects");
return (response.readEntity(Project.class));
......@@ -890,7 +890,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return the created project
* @throws GitLabApiException if any exception occurs
*/
public Project createProject(Integer namespaceId, Project project) throws GitLabApiException {
public Project createProject(Long namespaceId, Project project) throws GitLabApiException {
if (project == null) {
throw new RuntimeException("Project instance cannot be null.");
......@@ -1071,7 +1071,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return the GitLab Project
* @throws GitLabApiException if any exception occurs
*/
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException {
if (isApiVersion(ApiVersion.V3)) {
......@@ -1117,7 +1117,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return the GitLab Project
* @throws GitLabApiException if any exception occurs
*/
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel,
Boolean printingMergeRequestLinkEnabled, String importUrl) throws GitLabApiException {
......@@ -1167,7 +1167,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* Boolean, Boolean, Visibility, Integer, String)}
*/
@Deprecated
public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled,
Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) throws GitLabApiException {
if (name == null || name.trim().length() == 0) {
......@@ -1331,7 +1331,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/: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
* @throws GitLabApiException if any exception occurs
*/
public void deleteProject(Object projectIdOrPath) throws GitLabApiException {
......@@ -1346,7 +1346,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/fork</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 namespace path of the namespace that the project will be forked to
* @return the newly forked Project instance
* @throws GitLabApiException if any exception occurs
......@@ -1362,13 +1362,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/fork</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 namespaceId ID of the namespace that the project will be forked to
* @return the newly forked Project instance
* @throws GitLabApiException if any exception occurs
*/
public Project forkProject(Object projectIdOrPath, Integer namespaceId) throws GitLabApiException {
return forkProject(projectIdOrPath, Integer.toString(namespaceId));
public Project forkProject(Object projectIdOrPath, Long namespaceId) throws GitLabApiException {
return forkProject(projectIdOrPath, Long.toString(namespaceId));
}
/**
......@@ -1378,7 +1378,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/fork</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 namespace path of the namespace that the project will be forked to
* @param path the path that will be assigned to the resultant project after forking
* @param name the name that will be assigned to the resultant project after forking
......@@ -1401,12 +1401,12 @@ public class ProjectApi extends AbstractApi implements Constants {
* <pre><code>GitLab Endpoint: POST /projects/:id/fork/:forkFromId</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 forkedFromId the ID of the project that was forked from
* @return the updated Project instance
* @throws GitLabApiException if any exception occurs
*/
public Project createForkedFromRelationship(Object projectIdOrPath, Integer forkedFromId) throws GitLabApiException {
public Project createForkedFromRelationship(Object projectIdOrPath, Long forkedFromId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED);
Response response = post(expectedStatus, (Form)null, "projects", this.getProjectIdOrPath(projectIdOrPath), "fork", forkedFromId);
return (response.readEntity(Project.class));
......@@ -1417,7 +1417,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/fork</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
*/
public void deleteForkedFromRelationship(Object projectIdOrPath) throws GitLabApiException {
......@@ -1430,7 +1430,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members</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 the members belonging to the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -1443,7 +1443,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members</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 perPage the number of Member instances per page
* @return the members belonging to the specified project
......@@ -1459,7 +1459,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members</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 Project instances that will be fetched per page
* @return the members belonging to the specified project
* @throws GitLabApiException if any exception occurs
......@@ -1473,7 +1473,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members</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 the members belonging to the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -1489,7 +1489,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 the project members viewable by the authenticated user, including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs
*/
......@@ -1505,7 +1505,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members</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 perPage the number of Member instances per page
* @return the project members viewable by the authenticated user, including inherited members through ancestor groups
......@@ -1527,7 +1527,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 Project instances that will be fetched per page
* @return a Pager of the project members viewable by the authenticated user,
* including inherited members through ancestor groups
......@@ -1545,7 +1545,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 the project members viewable by the authenticated user,
* including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs
......@@ -1562,13 +1562,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 query a query string to search for members
* @param userIds filter the results on the given user IDs
* @return the project members viewable by the authenticated user, including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs
*/
public List<Member> getAllMembers(Object projectIdOrPath, String query, List<Integer> userIds) throws GitLabApiException {
public List<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException {
return (getAllMembers(projectIdOrPath, query, userIds, getDefaultPerPage()).all());
}
......@@ -1580,7 +1580,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 query a query string to search for members
* @param userIds filter the results on the given user IDs
* @param itemsPerPage the number of Project instances that will be fetched per page
......@@ -1588,7 +1588,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs
*/
public Pager<Member> getAllMembers(Object projectIdOrPath, String query, List<Integer> userIds, int itemsPerPage) throws GitLabApiException {
public Pager<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds, int itemsPerPage) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("query", query).withParam("user_ids", userIds);
return (new Pager<Member>(this, Member.class, itemsPerPage, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "members", "all"));
......@@ -1602,14 +1602,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all</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 query a query string to search for members
* @param userIds filter the results on the given user IDs
* @return a Stream of the project members viewable by the authenticated user,
* including inherited members through ancestor groups
* @throws GitLabApiException if any exception occurs
*/
public Stream<Member> getAllMembersStream(Object projectIdOrPath, String query, List<Integer> userIds) throws GitLabApiException {
public Stream<Member> getAllMembersStream(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException {
return (getAllMembers(projectIdOrPath, query, userIds, getDefaultPerPage()).stream());
}
......@@ -1618,12 +1618,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/:user_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 userId the user ID of the member
* @return the member specified by the project ID/user ID pair
* @throws GitLabApiException if any exception occurs
*/
public Member getMember(Object projectIdOrPath, Integer userId) throws GitLabApiException {
public Member getMember(Object projectIdOrPath, Long userId) throws GitLabApiException {
return (getMember(projectIdOrPath, userId, false));
}
......@@ -1632,11 +1632,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/:user_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 userId the user ID of the member
* @return the member specified by the project ID/user ID pair
*/
public Optional<Member> getOptionalMember(Object projectIdOrPath, Integer userId) {
public Optional<Member> getOptionalMember(Object projectIdOrPath, Long userId) {
try {
return (Optional.ofNullable(getMember(projectIdOrPath, userId, false)));
} catch (GitLabApiException glae) {
......@@ -1649,13 +1649,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all/:user_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 userId the user ID of the member
* @param includeInherited if true will the member even if inherited thru an ancestor group
* @return the member specified by the project ID/user ID pair
* @throws GitLabApiException if any exception occurs
*/
public Member getMember(Object projectIdOrPath, Integer userId, Boolean includeInherited) throws GitLabApiException {
public Member getMember(Object projectIdOrPath, Long userId, Boolean includeInherited) throws GitLabApiException {
Response response;
if (includeInherited) {
response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", "all", userId);
......@@ -1670,12 +1670,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/members/all/:user_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 userId the user ID of the member
* @param includeInherited if true will the member even if inherited thru an ancestor group
* @return the member specified by the project ID/user ID pair as the value of an Optional
*/
public Optional<Member> getOptionalMember(Object projectIdOrPath, Integer userId, Boolean includeInherited) {
public Optional<Member> getOptionalMember(Object projectIdOrPath, Long userId, Boolean includeInherited) {
try {
return (Optional.ofNullable(getMember(projectIdOrPath, userId, includeInherited)));
} catch (GitLabApiException glae) {
......@@ -1690,13 +1690,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/members</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 userId the user ID of the member to add, required
* @param accessLevel the access level for the new member, required
* @return the added member
* @throws GitLabApiException if any exception occurs
*/
public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException {
public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException {
return (addMember(projectIdOrPath, userId, accessLevel, null));
}
......@@ -1707,13 +1707,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/members</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 userId the user ID of the member to add, required
* @param accessLevel the access level for the new member, required
* @return the added member
* @throws GitLabApiException if any exception occurs
*/
public Member addMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException {
public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException {
return (addMember(projectIdOrPath, userId, accessLevel.toValue(), null));
}
......@@ -1724,14 +1724,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/members</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 userId the user ID of the member to add
* @param accessLevel the access level for the new member
* @param expiresAt the date the membership in the group will expire
* @return the added member
* @throws GitLabApiException if any exception occurs
*/
public Member addMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException {
public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException {
return (addMember(projectIdOrPath, userId, accessLevel.toValue(), expiresAt));
}
......@@ -1742,14 +1742,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/members</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 userId the user ID of the member to add
* @param accessLevel the access level for the new member
* @param expiresAt the date the membership in the group will expire
* @return the added member
* @throws GitLabApiException if any exception occurs
*/
public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException {
public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("user_id", userId, true)
.withParam("access_level", accessLevel, true)
......@@ -1763,13 +1763,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:projectId/members/:userId</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 userId the user ID of the member to update, required
* @param accessLevel the new access level for the member, required
* @return the updated member
* @throws GitLabApiException if any exception occurs
*/
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException {
public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException {
return (updateMember(projectIdOrPath, userId, accessLevel, null));
}
......@@ -1778,13 +1778,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:projectId/members/:userId</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 userId the user ID of the member to update, required
* @param accessLevel the new access level for the member, required
* @return the updated member
* @throws GitLabApiException if any exception occurs
*/
public Member updateMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException {
public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException {
return (updateMember(projectIdOrPath, userId, accessLevel.toValue(), null));
}
......@@ -1793,14 +1793,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:projectId/members/:userId</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 userId the user ID of the member to update, required
* @param accessLevel the new access level for the member, required
* @param expiresAt the date the membership in the group will expire, optional
* @return the updated member
* @throws GitLabApiException if any exception occurs
*/
public Member updateMember(Object projectIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException {
public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException {
return (updateMember(projectIdOrPath, userId, accessLevel.toValue(), expiresAt));
}
......@@ -1809,14 +1809,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:projectId/members/:userId</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 userId the user ID of the member to update, required
* @param accessLevel the new access level for the member, required
* @param expiresAt the date the membership in the group will expire, optional
* @return the updated member
* @throws GitLabApiException if any exception occurs
*/
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException {
public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("access_level", accessLevel, true)
.withParam("expires_at", expiresAt, false);
......@@ -1829,11 +1829,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/members/:user_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 userId the user ID of the member to remove
* @throws GitLabApiException if any exception occurs
*/
public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException {
public void removeMember(Object projectIdOrPath, Long userId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId);
}
......@@ -1843,7 +1843,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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
* @return the users belonging to the specified project and its parent groups
* @throws GitLabApiException if any exception occurs
*/
......@@ -1856,7 +1856,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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 Project instances that will be fetched per page
* @return a Pager of the users matching the search string and belonging to the specified project and its parent groups
* @throws GitLabApiException if any exception occurs
......@@ -1870,7 +1870,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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
* @return a Stream of the users belonging to the specified project and its parent groups
* @throws GitLabApiException if any exception occurs
*/
......@@ -1884,7 +1884,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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 search the string to match specific users
* @return the users matching the search string and belonging to the specified project and its parent groups
* @throws GitLabApiException if any exception occurs
......@@ -1899,7 +1899,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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 search the string to match specific users
* @param itemsPerPage the number of Project instances that will be fetched per page
* @return a Pager of the users matching the search string and belonging to the specified project and its parent groups
......@@ -1917,7 +1917,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/users</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 search the string to match specific users
* @return a Stream of the users matching the search string and belonging to the specified project and its parent groups
* @throws GitLabApiException if any exception occurs
......@@ -1931,7 +1931,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/events</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
* @return the project events for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -1944,7 +1944,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/events</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 page the page to get
* @param perPage the number of Event instances per page
* @return the project events for the specified project
......@@ -1960,7 +1960,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/events</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 itemsPerPage the number of Project instances that will be fetched per page
* @return a Pager of project events for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -1974,7 +1974,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/events</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
* @return a Stream of the project events for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -1987,7 +1987,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks</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
* @return a list of project hooks for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2000,7 +2000,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks</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 page the page to get
* @param perPage the number of ProjectHook instances per page
* @return a list of project hooks for the specified project in the specified page range
......@@ -2016,7 +2016,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks</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 itemsPerPage the number of Project instances that will be fetched per page
* @return a Pager of project hooks for the specified project
* @throws GitLabApiException if any exception occurs
......@@ -2030,7 +2030,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks</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
* @return a Stream of project hooks for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2043,12 +2043,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks/:hook_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 hookId the ID of the hook to get
* @return the project hook for the specified project ID/hook ID pair
* @throws GitLabApiException if any exception occurs
*/
public ProjectHook getHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException {
public ProjectHook getHook(Object projectIdOrPath, Long hookId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId);
return (response.readEntity(ProjectHook.class));
}
......@@ -2058,11 +2058,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/hooks/:hook_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 hookId the ID of the hook to get
* @return the project hook for the specified project ID/hook ID pair as an Optional instance
*/
public Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Integer hookId) {
public Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Long hookId) {
try {
return (Optional.ofNullable(getHook(projectIdOrPath, hookId)));
} catch (GitLabApiException glae) {
......@@ -2075,7 +2075,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/hooks</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 url the callback URL for the hook
* @param enabledHooks a ProjectHook instance specifying which hooks to enable
* @param enableSslVerification enable SSL verification
......@@ -2114,7 +2114,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/hooks</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 url the callback URL for the hook
* @param doPushEvents flag specifying whether to do push events
* @param doIssuesEvents flag specifying whether to do issues events
......@@ -2140,11 +2140,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/hooks/:hook_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 hookId the project hook ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException {
public void deleteHook(Object projectIdOrPath, Long hookId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId);
}
......@@ -2200,7 +2200,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a list of project's issues
* @throws GitLabApiException if any exception occurs
* @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)}
......@@ -2215,7 +2215,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param page the page to get
* @param perPage the number of issues per page
* @return the list of issues in the specified range
......@@ -2233,7 +2233,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param itemsPerPage the number of issues per page
* @return the list of issues in the specified range
* @throws GitLabApiException if any exception occurs
......@@ -2249,7 +2249,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @return a Stream of the project's issues
* @throws GitLabApiException if any exception occurs
* @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)}
......@@ -2264,14 +2264,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param issueId the internal ID of a project's issue
* @return the specified Issue instance
* @throws GitLabApiException if any exception occurs
* @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssue(Object, Integer)}
*/
@Deprecated
public Issue getIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException {
public Issue getIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId);
return (response.readEntity(Issue.class));
}
......@@ -2281,13 +2281,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <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 issueId the internal ID of a project's issue
* @throws GitLabApiException if any exception occurs
* @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#deleteIssue(Object, Integer)}
*/
@Deprecated
public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException {
public void deleteIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId);
}
......@@ -2297,7 +2297,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets</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
* @return a list of the project's snippets
* @throws GitLabApiException if any exception occurs
*/
......@@ -2310,7 +2310,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets</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 page the page to get
* @param perPage the number of snippets per page
* @return a list of project's snippets for the specified range
......@@ -2326,7 +2326,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets</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 itemsPerPage the number of snippets per page
* @return the Pager of snippets
* @throws GitLabApiException if any exception occurs
......@@ -2340,7 +2340,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets</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
* @return a Stream of the project's snippets
* @throws GitLabApiException if any exception occurs
*/
......@@ -2353,12 +2353,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_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 snippetId the ID of the project's snippet
* @return the specified project Snippet
* @throws GitLabApiException if any exception occurs
*/
public Snippet getSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
public Snippet getSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId);
return (response.readEntity(Snippet.class));
}
......@@ -2368,11 +2368,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_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 snippetId the ID of the project's snippet
* @return the specified project Snippet as an Optional instance
*/
public Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Integer snippetId) {
public Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Long snippetId) {
try {
return (Optional.ofNullable(getSnippet(projectIdOrPath, snippetId)));
} catch (GitLabApiException glae) {
......@@ -2385,7 +2385,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/snippets</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 title the title of a snippet, required
* @param filename the name of a snippet file, required
* @param description the description of a snippet, optional
......@@ -2433,7 +2433,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/snippets/:snippet_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 snippetId the ID of a project's snippet, required
* @param title the title of a snippet, optional
* @param filename the name of a snippet file, optional
......@@ -2443,7 +2443,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return a Snippet instance with info on the updated snippet
* @throws GitLabApiException if any exception occurs
*/
public Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description,
public Snippet updateSnippet(Object projectIdOrPath, Long snippetId, String title, String filename, String description,
String code, Visibility visibility) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
......@@ -2463,11 +2463,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/snippets/:snippet_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 snippetId the ID of the project's snippet
* @throws GitLabApiException if any exception occurs
*/
public void deleteSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
public void deleteSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId);
}
......@@ -2476,12 +2476,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw</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 snippetId the ID of the project's snippet
* @return the raw project snippet plain text as an Optional instance
* @throws GitLabApiException if any exception occurs
*/
public String getRawSnippetContent(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
public String getRawSnippetContent(Object projectIdOrPath, Long snippetId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "raw");
return (response.readEntity(String.class));
}
......@@ -2491,11 +2491,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw</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 snippetId the ID of the project's snippet
* @return the raw project snippet plain text as an Optional instance
*/
public Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Integer snippetId) {
public Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Long snippetId) {
try {
return (Optional.ofNullable(getRawSnippetContent(projectIdOrPath, snippetId)));
} catch (GitLabApiException glae) {
......@@ -2508,13 +2508,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/share</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 groupId the ID of the group to share with, required
* @param accessLevel the permissions level to grant the group, required
* @param expiresAt the share expiration date, optional
* @throws GitLabApiException if any exception occurs
*/
public void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt)
public void shareProject(Object projectIdOrPath, Long groupId, AccessLevel accessLevel, Date expiresAt)
throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("group_id", groupId, true)
......@@ -2528,11 +2528,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/share/:group_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 groupId the ID of the group to unshare, required
* @throws GitLabApiException if any exception occurs
*/
public void unshareProject(Object projectIdOrPath, Integer groupId) throws GitLabApiException {
public void unshareProject(Object projectIdOrPath, Long groupId) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "share", groupId);
}
......@@ -2542,7 +2542,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/archive</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
* @return the archived GitLab Project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2557,7 +2557,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/unarchive</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
* @return the unarchived GitLab Project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2572,7 +2572,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/uploads</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 fileToUpload the File instance of the file to upload, required
* @return a FileUpload instance with information on the just uploaded file
* @throws GitLabApiException if any exception occurs
......@@ -2586,7 +2586,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/uploads</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 fileToUpload the File instance of the file to upload, required
* @param mediaType unused; will be removed in the next major version
* @return a FileUpload instance with information on the just uploaded file
......@@ -2618,7 +2618,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/push_rule</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
* @return the push rules for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2648,7 +2648,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG
*</code>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pushRule the PushRule instance containing the push rule configuration to add
* @return a PushRules instance with the newly created push rule info
* @throws GitLabApiException if any exception occurs
......@@ -2692,7 +2692,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG
*</code>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param pushRule the PushRules instance containing the push rule configuration to update
* @return a PushRules instance with the newly created push rule info
* @throws GitLabApiException if any exception occurs
......@@ -2721,7 +2721,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/push_rule</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
* @throws GitLabApiException if any exception occurs
*/
public void deletePushRules(Object projectIdOrPath) throws GitLabApiException {
......@@ -2733,7 +2733,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/forks</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
* @return a List of forked projects
* @throws GitLabApiException if any exception occurs
*/
......@@ -2746,7 +2746,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/forks</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 page the page to get
* @param perPage the number of projects per page
* @return a List of forked projects
......@@ -2762,7 +2762,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/forks</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 itemsPerPage the number of Project instances that will be fetched per page
* @return a Pager of projects
* @throws GitLabApiException if any exception occurs
......@@ -2776,7 +2776,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/forks</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
* @return a Stream of forked projects
* @throws GitLabApiException if any exception occurs
*/
......@@ -2819,7 +2819,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/languages</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
* @return a Map instance with the language as the key and the percentage as the value
* @throws GitLabApiException if any exception occurs
* @since GitLab 10.8
......@@ -2834,7 +2834,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/transfer.</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 namespace the namespace to transfer the project to
* @return the updated Project
* @throws GitLabApiException if any exception occurs
......@@ -2850,7 +2850,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/: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 avatarFile the File instance of the avatar file to upload
* @return the updated Project instance
* @throws GitLabApiException if any exception occurs
......@@ -2921,7 +2921,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return the project Audit event
* @throws GitLabApiException if any exception occurs
*/
public AuditEvent getAuditEvent(Object projectIdOrPath, Integer auditEventId) throws GitLabApiException {
public AuditEvent getAuditEvent(Object projectIdOrPath, Long auditEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class));
}
......@@ -2931,7 +2931,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables</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
* @return a list of variables belonging to the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2944,7 +2944,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables</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 page the page to get
* @param perPage the number of Variable instances per page
* @return a list of variables belonging to the specified project in the specified page range
......@@ -2960,7 +2960,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables</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 itemsPerPage the number of Variable instances that will be fetched per page
* @return a Pager of variables belonging to the specified project
* @throws GitLabApiException if any exception occurs
......@@ -2974,7 +2974,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables</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
* @return a Stream of variables belonging to the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -2987,7 +2987,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</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 key the key of an existing variable, required
* @return the Variable instance for the specified variable
* @throws GitLabApiException if any exception occurs
......@@ -3002,7 +3002,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</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 key the key of an existing variable, required
* @return the Variable for the specified variable as an Optional instance
*/
......@@ -3019,7 +3019,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/variables</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 key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
......@@ -3037,7 +3037,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/variables</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 key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
......@@ -3056,7 +3056,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/variables</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 key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param variableType the type of variable. Available types are: env_var (default) and file
......@@ -3077,7 +3077,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/variables</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 key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param variableType the type of variable. Available types are: env_var (default) and file
......@@ -3106,7 +3106,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</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 key the key of an existing variable, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
......@@ -3124,7 +3124,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</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 key the key of an existing variable, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
......@@ -3143,7 +3143,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</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 key the key of an existing variable, required
* @param value the value for the variable, required
* @param variableType the type of variable. Available types are: env_var (default) and file
......@@ -3164,7 +3164,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</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 key the key of an existing variable, required
* @param value the value for the variable, required
* @param variableType the type of variable. Available types are: env_var (default) and file
......@@ -3192,7 +3192,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/variables/:key</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 key the key of an existing variable, required
* @throws GitLabApiException if any exception occurs
*/
......@@ -3205,7 +3205,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/access_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
* @return a List of project AccessRequest instances accessible by the authenticated user
* @throws GitLabApiException if any exception occurs
*/
......@@ -3218,7 +3218,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/access_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 itemsPerPage the number of AccessRequest instances that will be fetched per page
* @return a Pager of project AccessRequest instances accessible by the authenticated user
* @throws GitLabApiException if any exception occurs
......@@ -3232,7 +3232,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/access_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
* @return a Stream of project AccessRequest instances accessible by the authenticated user
* @throws GitLabApiException if any exception occurs
*/
......@@ -3245,7 +3245,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/access_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
* @return the created AccessRequest instance
* @throws GitLabApiException if any exception occurs
*/
......@@ -3259,13 +3259,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/access_requests/:user_id/approve</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 userId the user ID to approve access for
* @param accessLevel the access level the user is approved for, if null will be developer (30)
* @return the approved AccessRequest instance
* @throws GitLabApiException if any exception occurs
*/
public AccessRequest approveAccessRequest(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException {
public AccessRequest approveAccessRequest(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("access_level", accessLevel);
Response response = this.putWithFormData(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId, "approve");
......@@ -3277,11 +3277,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/access_requests/:user_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 userId the user ID to deny access for
* @throws GitLabApiException if any exception occurs
*/
public void denyAccessRequest(Object projectIdOrPath, Integer userId) throws GitLabApiException {
public void denyAccessRequest(Object projectIdOrPath, Long userId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId);
}
......@@ -3291,7 +3291,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/housekeeping</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
*/
public void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException {
......@@ -3303,7 +3303,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/badges</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 Badge instances for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -3317,12 +3317,12 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/badges/:badge_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 badgeId the ID of the badge to get
* @return a Badge instance for the specified project/badge ID pair
* @throws GitLabApiException if any exception occurs
*/
public Badge getBadge(Object projectIdOrPath, Integer badgeId) throws GitLabApiException {
public Badge getBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "badges", badgeId);
return (response.readEntity(Badge.class));
}
......@@ -3332,11 +3332,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/badges/:badge_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 badgeId the ID of the badge to get
* @return an Optional instance with the specified badge as the value
*/
public Optional<Badge> getOptionalBadge(Object projectIdOrPath, Integer badgeId) {
public Optional<Badge> getOptionalBadge(Object projectIdOrPath, Long badgeId) {
try {
return (Optional.ofNullable(getBadge(projectIdOrPath, badgeId)));
} catch (GitLabApiException glae) {
......@@ -3349,7 +3349,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/badges</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 linkUrl the URL of the badge link
* @param imageUrl the URL of the image link
* @return a Badge instance for the added badge
......@@ -3368,14 +3368,14 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/badges</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 badgeId the ID of the badge to get
* @param linkUrl the URL of the badge link
* @param imageUrl the URL of the image link
* @return a Badge instance for the editted badge
* @throws GitLabApiException if any exception occurs
*/
public Badge editBadge(Object projectIdOrPath, Integer badgeId, String linkUrl, String imageUrl) throws GitLabApiException {
public Badge editBadge(Object projectIdOrPath, Long badgeId, String linkUrl, String imageUrl) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("link_url", linkUrl, false)
.withParam("image_url", imageUrl, false);
......@@ -3388,11 +3388,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/badges/:badge_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 badgeId the ID of the badge to remove
* @throws GitLabApiException if any exception occurs
*/
public void removeBadge(Object projectIdOrPath, Integer badgeId) throws GitLabApiException {
public void removeBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "badges", badgeId);
}
......@@ -3401,7 +3401,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/badges/render</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 linkUrl the URL of the badge link
* @param imageUrl the URL of the image link
* @return a Badge instance for the rendered badge
......@@ -3421,7 +3421,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/approvals</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 ProjectApprovalsConfig instance with the project's approvals configuration
* @throws GitLabApiException if any exception occurs
*/
......@@ -3436,7 +3436,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/approvals</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 config a ProjectApprovalsConfig instance with the approval configuration
* @return a ProjectApprovalsConfig instance with the project's approvals configuration
* @throws GitLabApiException if any exception occurs
......@@ -3453,7 +3453,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/approval_rules</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 ApprovalRuke instances for the specified project.
* @throws GitLabApiException if any exception occurs
*/
......@@ -3467,7 +3467,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/approval_rules</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 ApprovalRule instances that will be fetched per page
* @return a Pager of ApprovalRuke instances for the specified project.
* @throws GitLabApiException if any exception occurs
......@@ -3484,7 +3484,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/approval_rules</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 ApprovalRule instances for the specified project.
* @throws GitLabApiException if any exception occurs
*/
......@@ -3498,7 +3498,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/approval_rules</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 params the ApprovalRuleParams instance holding the parameters for the approval rule
* @return a ApprovalRule instance with approval configuration
* @throws GitLabApiException if any exception occurs
......@@ -3516,13 +3516,13 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/approval_rules/:approval_rule_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 approvalRuleId the ID of the approval rule
* @param params the ApprovalRuleParams instance holding the parameters for the approval rule update
* @return a ApprovalRule instance with approval configuration
* @throws GitLabApiException if any exception occurs
*/
public ApprovalRule updateApprovalRule(Object projectIdOrPath, Integer approvalRuleId, ApprovalRuleParams params) throws GitLabApiException {
public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException {
if (approvalRuleId == null) {
throw new RuntimeException("approvalRuleId cannot be null");
......@@ -3540,11 +3540,11 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/approval_rules/:approval_rule_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 approvalRuleId the ID of the approval rule
* @throws GitLabApiException if any exception occurs
*/
public void deleteApprovalRule(Object projectIdOrPath, Integer approvalRuleId) throws GitLabApiException {
public void deleteApprovalRule(Object projectIdOrPath, Long approvalRuleId) throws GitLabApiException {
if (approvalRuleId == null) {
throw new RuntimeException("approvalRuleId cannot be null");
......@@ -3558,7 +3558,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/custom_attributes</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 CustomAttributes
* @throws GitLabApiException if any exception occurs
*/
......@@ -3571,7 +3571,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/custom_attributes</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
* @return a Pager of project's custom attributes
* @throws GitLabApiException if any exception occurs
......@@ -3586,7 +3586,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/custom_attributes</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 custom attributes
* @throws GitLabApiException if any exception occurs
*/
......@@ -3599,7 +3599,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/custom_attributes/:key</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 key the key for the custom attribute
* @return a CustomAttribute instance for the specified key
* @throws GitLabApiException if any exception occurs
......@@ -3615,7 +3615,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/custom_attributes/:key</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 key the key for the custom attribute, required
* @return an Optional instance with the value for a single custom attribute for the specified project
*/
......@@ -3633,7 +3633,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/custom_attributes/:key</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 key the key for the custom attribute
* @param value the value for the customAttribute
* @return a CustomAttribute instance for the updated or created custom attribute
......@@ -3659,7 +3659,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/custom_attributes/:key</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 key the key of the custom attribute to delete
* @throws GitLabApiException if any exception occurs
*/
......@@ -3677,7 +3677,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/remote_mirrors</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 remote mirrors
* @throws GitLabApiException if any exception occurs
*/
......@@ -3690,7 +3690,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/remote_mirrors</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
* @return a Pager of project's remote mirrors
* @throws GitLabApiException if any exception occurs
......@@ -3705,7 +3705,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/remote_mirrors</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 remote mirrors
* @throws GitLabApiException if any exception occurs
*/
......@@ -3719,7 +3719,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/remote_mirrors</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 url the URL of the remote repository to be mirrored
* @param enabled determines if the mirror is enabled
* @param onlyProtectedBranches determines if only protected branches are mirrored
......@@ -3744,7 +3744,7 @@ public class ProjectApi extends AbstractApi implements Constants {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/remote_mirrors/:mirror_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 mirrorId the ID of the remote mirror
* @param enabled determines if the mirror is enabled
* @param onlyProtectedBranches determines if only protected branches are mirrored
......@@ -3752,7 +3752,7 @@ public class ProjectApi extends AbstractApi implements Constants {
* @return a RemoteMirror instance with the updated remote mirror configuration
* @throws GitLabApiException if any exception occurs
*/
public RemoteMirror updateRemoteMirror(Object projectIdOrPath, Integer mirrorId, Boolean enabled,
public RemoteMirror updateRemoteMirror(Object projectIdOrPath, Long mirrorId, Boolean enabled,
Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
......
......@@ -26,7 +26,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</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 the list of protected branches for the project
* @throws GitLabApiException if any exception occurs
*/
......@@ -39,7 +39,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</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 instances that will be fetched per page
* @return the Pager of protected branches for the project
* @throws GitLabApiException if any exception occurs
......@@ -54,7 +54,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</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 the Stream of protected branches for the project
* @throws GitLabApiException if any exception occurs
*/
......@@ -67,7 +67,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches/:branch_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 branchName the name of the branch or wildcard
* @return a ProtectedBranch instance with info on the protected branch
* @throws GitLabApiException if any exception occurs
......@@ -83,7 +83,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches/:branch_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 branchName the name of the branch or wildcard
* @return an Optional instance with the specified protected branch as a value
*/
......@@ -100,7 +100,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/protected_branches/: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 branchName the name of the branch to un-protect, can be a wildcard
* @throws GitLabApiException if any exception occurs
*/
......@@ -114,7 +114,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</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 branchName the name of the branch to protect, can be a wildcard
* @return the branch info for the protected branch
* @throws GitLabApiException if any exception occurs
......@@ -128,7 +128,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</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 branchName the name of the branch to protect, can be a wildcard
* @param pushAccessLevel Access levels allowed to push (defaults: 40, maintainer access level)
* @param mergeAccessLevel Access levels allowed to merge (defaults: 40, maintainer access level)
......@@ -144,7 +144,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</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 branchName the name of the branch to protect, can be a wildcard
* @param pushAccessLevel access levels allowed to push (defaults: 40, maintainer access level)
* @param mergeAccessLevel access levels allowed to merge (defaults: 40, maintainer access level)
......@@ -174,7 +174,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</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 branchName the name of the branch to protect, can be a wildcard
* @param allowedToPushUserId user ID allowed to push, can be null
* @param allowedToMergeUserId user ID allowed to merge, can be null
......@@ -205,7 +205,7 @@ public class ProtectedBranchesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</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 branchName the name of the branch to protect, can be a wildcard
* @param allowedToPush an AllowedTo instance holding the configuration for "allowed_to_push"
* @param allowedToMerge an AllowedTo instance holding the configuration for "allowed_to_merge"
......
......@@ -136,7 +136,7 @@ public class ReleasesApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/releases/: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 tagName the tag name that the release was created from
* @throws GitLabApiException if any exception occurs
*/
......
......@@ -43,7 +43,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</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 the list of repository branches for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -56,7 +56,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</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 perPage the number of Branch instances per page
* @return the list of repository branches for the specified project
......@@ -73,7 +73,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</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 Project instances that will be fetched per page
* @return the list of repository branches for the specified project ID
*
......@@ -88,7 +88,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</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 repository branches for the specified project
* @throws GitLabApiException if any exception occurs
*/
......@@ -101,7 +101,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches/:branch</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 branchName the name of the branch to get
* @return the branch info for the specified project ID/branch name pair
* @throws GitLabApiException if any exception occurs
......@@ -117,7 +117,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches?search=:search</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 search the branch name search term
* @return the List of repository branches for the specified project ID and search term
* @throws GitLabApiException if any exception occurs
......@@ -131,7 +131,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches?search=:search</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 search the branch name search term
* @param itemsPerPage the number of Project instances that will be fetched per page
* @return the list of repository branches for the specified project ID and search term
......@@ -151,7 +151,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches?search=:search</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 search the branch name search term
* @return the Stream of repository branches for the specified project ID and search term
*
......@@ -166,7 +166,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches/:branch</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 branchName the name of the branch to get
* @return an Optional instance with the info for the specified project ID/branch name pair as the value
* @throws GitLabApiException if any exception occurs
......@@ -184,7 +184,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/branches</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 branchName the name of the branch to create
* @param ref Source to create the branch from, can be an existing branch, tag or commit SHA
* @return the branch info for the created branch
......@@ -205,7 +205,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch</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 branchName the name of the branch to delete
* @throws GitLabApiException if any exception occurs
*/
......@@ -221,7 +221,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/protect</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 branchName the name of the branch to protect
* @return the branch info for the protected branch
* @throws GitLabApiException if any exception occurs
......@@ -238,7 +238,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/unprotect</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 branchName the name of the branch to un-protect
* @return the branch info for the unprotected branch
* @throws GitLabApiException if any exception occurs
......@@ -254,7 +254,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tree</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 tree with the root directories and files of a project
* @throws GitLabApiException if any exception occurs
*/
......@@ -267,7 +267,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tree</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 Project instances that will be fetched per page
* @return a Pager containing a tree with the root directories and files of a project
* @throws GitLabApiException if any exception occurs
......@@ -281,7 +281,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/tree</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 a tree with the root directories and files of a project
* @throws GitLabApiException if any exception occurs
*/
......@@ -298,7 +298,7 @@ public class RepositoryApi extends AbstractApi {
* path (optional) - The path inside repository. Used to get content of subdirectories
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @return a tree with the directories and files of a project
......@@ -317,7 +317,7 @@ public class RepositoryApi extends AbstractApi {
* path (optional) - The path inside repository. Used to get content of subdirectories
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @param itemsPerPage the number of Project instances that will be fetched per page
......@@ -337,7 +337,7 @@ public class RepositoryApi extends AbstractApi {
* path (optional) - The path inside repository. Used to get content of subdirectories
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @return a Stream containing a tree with the directories and files of a project
......@@ -357,7 +357,7 @@ public class RepositoryApi extends AbstractApi {
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
* recursive (optional) - Boolean value used to get a recursive tree (false by default)
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @param recursive flag to get a recursive tree or not
......@@ -378,7 +378,7 @@ public class RepositoryApi extends AbstractApi {
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
* recursive (optional) - Boolean value used to get a recursive tree (false by default)
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @param recursive flag to get a recursive tree or not
......@@ -406,7 +406,7 @@ public class RepositoryApi extends AbstractApi {
* ref_name (optional) - The name of a repository branch or tag or if not given the default branch
* recursive (optional) - Boolean value used to get a recursive tree (false by default)
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param filePath the path inside repository, used to get content of subdirectories
* @param refName the name of a repository branch or tag or if not given the default branch
* @param recursive flag to get a recursive tree or not
......@@ -422,7 +422,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/raw_blobs/: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 the SHA of the file to get the contents for
* @return the raw file contents for the blob on an InputStream
* @throws GitLabApiException if any exception occurs
......@@ -438,7 +438,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @return an input stream that can be used to save as a file
* or to read the content of the archive
......@@ -456,7 +456,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @param format The archive format, defaults to "tar.gz" if null
* @return an input stream that can be used to save as a file or to read the content of the archive
......@@ -472,7 +472,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @param format The archive format, defaults to TAR_GZ if null
* @return an input stream that can be used to save as a file or to read the content of the archive
......@@ -503,7 +503,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir"
* @return a File instance pointing to the downloaded instance
......@@ -538,7 +538,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir"
* @param format The archive format, defaults to "tar.gz" if null
......@@ -556,7 +556,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</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 SHA of the archive to get
* @param directory the File instance of the directory to save the archive to, if null will use "java.io.tmpdir"
* @param format The archive format, defaults to TAR_GZ if null
......@@ -601,7 +601,7 @@ public class RepositoryApi extends AbstractApi {
* Compare branches, tags or commits. This can be accessed without authentication
* if the repository is publicly accessible.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param from the commit SHA or branch name
* @param to the commit SHA or branch name
* @param straight specifies the comparison method, true for direct comparison between from and to (from..to),
......@@ -623,7 +623,7 @@ public class RepositoryApi extends AbstractApi {
* Compare branches, tags or commits. This can be accessed without authentication
* if the repository is publicly accessible.
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param from the commit SHA or branch name
* @param to the commit SHA or branch name
* @return a CompareResults containing the results of the comparison
......@@ -638,7 +638,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</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 contributors for the specified project ID
* @throws GitLabApiException if any exception occurs
*/
......@@ -651,7 +651,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</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 perPage the number of projects per page
* @return a List containing the contributors for the specified project ID
......@@ -668,7 +668,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</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 Project instances that will be fetched per page
* @return a Pager containing the contributors for the specified project ID
* @throws GitLabApiException if any exception occurs
......@@ -683,7 +683,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</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 contributors for the specified project ID
* @throws GitLabApiException if any exception occurs
*/
......@@ -696,7 +696,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/merge_base</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 refs a List of 2 or more refs (commit SHAs, branch names or tags)
* @return the Commit instance containing the common ancestor
* @throws GitLabApiException if any exception occurs
......@@ -724,7 +724,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/merge_base</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 refs a List of 2 or more refs (commit SHAs, branch names or tags)
* @return an Optional instance with the Commit instance containing the common ancestor as the value
* @throws GitLabApiException if any exception occurs
......@@ -743,7 +743,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: /projects/:id/repository/merged_branches</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
*/
public void deleteMergedBranches(Object projectIdOrPath) throws GitLabApiException {
......@@ -756,7 +756,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/changelog</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 version the version to generate the changelog for
* @throws GitLabApiException if any exception occurs
*/
......@@ -769,7 +769,7 @@ public class RepositoryApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/repository/changelog</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 the payload to generate the changelog for
* @throws GitLabApiException if any exception occurs
*/
......
......@@ -136,7 +136,7 @@ public class RepositoryFileApi extends AbstractApi {
* @deprecated Will be removed in version 5.0, replaced by {@link #getFile(Object, String, String)}
*/
@Deprecated
public RepositoryFile getFile(String filePath, Integer projectId, String ref) throws GitLabApiException {
public RepositoryFile getFile(String filePath, Long projectId, String ref) throws GitLabApiException {
if (isApiVersion(ApiVersion.V3)) {
return (getFileV3(filePath, projectId, ref));
......@@ -184,7 +184,7 @@ public class RepositoryFileApi extends AbstractApi {
* @deprecated Will be removed in version 5.0
*/
@Deprecated
protected RepositoryFile getFileV3(String filePath, Integer projectId, String ref) throws GitLabApiException {
protected RepositoryFile getFileV3(String filePath, Long projectId, String ref) throws GitLabApiException {
Form form = new Form();
addFormParam(form, "file_path", filePath, true);
addFormParam(form, "ref", ref, true);
......@@ -245,7 +245,7 @@ public class RepositoryFileApi extends AbstractApi {
* @deprecated Will be removed in version 5.0, replaced by {@link #createFile(Object, RepositoryFile, String, String)}
*/
@Deprecated
public RepositoryFile createFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
public RepositoryFile createFile(RepositoryFile file, Long projectId, String branchName, String commitMessage) throws GitLabApiException {
return (createFile(projectId, file, branchName, commitMessage));
}
......@@ -302,7 +302,7 @@ public class RepositoryFileApi extends AbstractApi {
* @deprecated Will be removed in version 5.0, replaced by {@link #updateFile(Object, RepositoryFile, String, String)}
*/
@Deprecated
public RepositoryFile updateFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
public RepositoryFile updateFile(RepositoryFile file, Long projectId, String branchName, String commitMessage) throws GitLabApiException {
return (updateFile(projectId, file, branchName, commitMessage));
}
......@@ -358,7 +358,7 @@ public class RepositoryFileApi extends AbstractApi {
* @deprecated Will be removed in version 5.0, replaced by {@link #deleteFile(Object, String, String, String)}
*/
@Deprecated
public void deleteFile(String filePath, Integer projectId, String branchName, String commitMessage) throws GitLabApiException {
public void deleteFile(String filePath, Long projectId, String branchName, String commitMessage) throws GitLabApiException {
deleteFile(projectId, filePath, branchName, commitMessage);
}
......@@ -372,7 +372,7 @@ public class RepositoryFileApi extends AbstractApi {
* V4:
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:filepath</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 commitOrBranchName the commit or branch name to get the file for
* @param filepath the path of the file to get
* @param directory the File instance of the directory to save the file to, if null will use "java.io.tmpdir"
......@@ -414,7 +414,7 @@ public class RepositoryFileApi extends AbstractApi {
* V4:
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:filepath</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 commit or branch name to get the file contents for
* @param filepath the path of the file to get
* @return an InputStream to read the raw file from
......@@ -471,7 +471,7 @@ public class RepositoryFileApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame</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 filePath the path of the file to get the blame for
* @param ref the name of branch, tag or commit
* @return a List of Blame instances for the specified filePath and ref
......@@ -487,7 +487,7 @@ public class RepositoryFileApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame</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 filePath the path of the file to get the blame for
* @param ref the name of branch, tag or commit
* @param itemsPerPage the number of Project instances that will be fetched per page
......@@ -506,7 +506,7 @@ public class RepositoryFileApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:file_path/blame</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 filePath the path of the file to get the blame for
* @param ref the name of branch, tag or commit
* @return a Stream of Blame instances for the specified filePath and ref
......
......@@ -29,7 +29,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a List of LabelEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public List<LabelEvent> getIssueLabelEvents(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public List<LabelEvent> getIssueLabelEvents(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueLabelEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all());
}
......@@ -44,7 +44,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return the Pager of LabelEvent instances for the specified issue IID
* @throws GitLabApiException if any exception occurs
*/
public Pager<LabelEvent> getIssueLabelEvents(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
public Pager<LabelEvent> getIssueLabelEvents(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<LabelEvent>(this, LabelEvent.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_label_events"));
}
......@@ -59,7 +59,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a Stream of LabelEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public Stream<LabelEvent> getIssueLabelEventsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public Stream<LabelEvent> getIssueLabelEventsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueLabelEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
}
......@@ -74,7 +74,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return LabelEvent instance for the specified project issue
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getIssueLabelEvent(Object projectIdOrPath, Integer issueIid, Integer resourceLabelEventId) throws GitLabApiException {
public LabelEvent getIssueLabelEvent(Object projectIdOrPath, Long issueIid, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"issues", issueIid, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
......@@ -92,7 +92,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public Optional<LabelEvent> getOptionalIssueLabelEvent(Object projectIdOrPath,
Integer issueIid, Integer resourceLabelEventId) throws GitLabApiException {
Long issueIid, Long resourceLabelEventId) throws GitLabApiException {
try {
return (Optional.ofNullable(getIssueLabelEvent(projectIdOrPath, issueIid, resourceLabelEventId)));
......@@ -111,7 +111,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a List of LabelEvent for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public List<LabelEvent> getEpicLabelEvents(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
public List<LabelEvent> getEpicLabelEvents(Object projectIdOrPath, Long epicId) throws GitLabApiException {
return (getEpicLabelEvents(projectIdOrPath, epicId, getDefaultPerPage()).all());
}
......@@ -126,7 +126,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return the Pager of LabelEvent instances for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public Pager<LabelEvent> getEpicLabelEvents(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException {
public Pager<LabelEvent> getEpicLabelEvents(Object projectIdOrPath, Long epicId, int itemsPerPage) throws GitLabApiException {
return (new Pager<LabelEvent>(this, LabelEvent.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "resource_label_events"));
}
......@@ -141,7 +141,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a Stream of LabelEvent for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public Stream<LabelEvent> getEpicLabelEventsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
public Stream<LabelEvent> getEpicLabelEventsStream(Object projectIdOrPath, Long epicId) throws GitLabApiException {
return (getEpicLabelEvents(projectIdOrPath, epicId, getDefaultPerPage()).stream());
}
......@@ -156,7 +156,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return LabelEvent instance for the specified epic label event
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getEpicLabelEvent(Object projectIdOrPath, Integer epicId, Integer resourceLabelEventId) throws GitLabApiException {
public LabelEvent getEpicLabelEvent(Object projectIdOrPath, Long epicId, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"epics", epicId, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
......@@ -174,7 +174,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public Optional<LabelEvent> getOptionalEpicLabelEvent(Object projectIdOrPath,
Integer epicId, Integer resourceLabelEventId) throws GitLabApiException {
Long epicId, Long resourceLabelEventId) throws GitLabApiException {
try {
return (Optional.ofNullable(getEpicLabelEvent(projectIdOrPath, epicId, resourceLabelEventId)));
......@@ -193,7 +193,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a List of LabelEvent for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public List<LabelEvent> getMergeRequestLabelEvents(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public List<LabelEvent> getMergeRequestLabelEvents(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestLabelEvents(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -208,7 +208,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return the Pager of LabelEvent instances for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Pager<LabelEvent> getMergeRequestLabelEvents(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<LabelEvent> getMergeRequestLabelEvents(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<LabelEvent>(this, LabelEvent.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "resource_label_events"));
}
......@@ -223,7 +223,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return a Stream of LabelEvent for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public Stream<LabelEvent> getMergeRequestLabelEventsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
public Stream<LabelEvent> getMergeRequestLabelEventsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getMergeRequestLabelEvents(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......@@ -238,7 +238,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @return LabelEvent instance for the specified epic label event
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getMergeRequestLabelEvent(Object projectIdOrPath, Integer mergeRequestIid, Integer resourceLabelEventId) throws GitLabApiException {
public LabelEvent getMergeRequestLabelEvent(Object projectIdOrPath, Long mergeRequestIid, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
......@@ -256,7 +256,7 @@ public class ResourceLabelEventsApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public Optional<LabelEvent> getOptionalMergeRequestLabelEvent(Object projectIdOrPath,
Integer mergeRequestIid, Integer resourceLabelEventId) throws GitLabApiException {
Long mergeRequestIid, Long resourceLabelEventId) throws GitLabApiException {
try {
return (Optional.ofNullable(getMergeRequestLabelEvent(projectIdOrPath, mergeRequestIid, resourceLabelEventId)));
......
package org.gitlab4j.api;
import org.gitlab4j.api.models.IssueEvent;
import org.gitlab4j.api.models.LabelEvent;
import javax.ws.rs.core.Response;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import org.gitlab4j.api.models.IssueEvent;
/**
* This class provides an entry point to all the GitLab Resource state events API
......@@ -29,7 +26,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return a List of IssueEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public List<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public List<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).all());
}
......@@ -44,7 +41,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return the Pager of IssueEvent instances for the specified issue IID
* @throws GitLabApiException if any exception occurs
*/
public Pager<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
public Pager<IssueEvent> getIssueStateEvents(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<IssueEvent>(this, IssueEvent.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "resource_state_events"));
}
......@@ -59,7 +56,7 @@ public class ResourceStateEventsApi extends AbstractApi {
* @return a Stream of IssueEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public Stream<IssueEvent> getIssueStateEventsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
public Stream<IssueEvent> getIssueStateEventsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
return (getIssueStateEvents(projectIdOrPath, issueIid, getDefaultPerPage()).stream());
}
}
......@@ -265,7 +265,7 @@ public class RunnersApi extends AbstractApi {
* @return RunnerDetail instance.
* @throws GitLabApiException if any exception occurs
*/
public RunnerDetail getRunnerDetail(Integer runnerId) throws GitLabApiException {
public RunnerDetail getRunnerDetail(Long runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
......@@ -290,7 +290,7 @@ public class RunnersApi extends AbstractApi {
* @return RunnerDetail instance.
* @throws GitLabApiException if any exception occurs
*/
public RunnerDetail updateRunner(Integer runnerId, String description, Boolean active, List<String> tagList,
public RunnerDetail updateRunner(Long runnerId, String description, Boolean active, List<String> tagList,
Boolean runUntagged, Boolean locked, RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
......@@ -315,7 +315,7 @@ public class RunnersApi extends AbstractApi {
* @param runnerId The ID of a runner
* @throws GitLabApiException if any exception occurs
*/
public void removeRunner(Integer runnerId) throws GitLabApiException {
public void removeRunner(Long runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
......@@ -333,7 +333,7 @@ public class RunnersApi extends AbstractApi {
* @return List jobs that are being processed or were processed by specified Runner
* @throws GitLabApiException if any exception occurs
*/
public List<Job> getJobs(Integer runnerId) throws GitLabApiException {
public List<Job> getJobs(Long runnerId) throws GitLabApiException {
return (getJobs(runnerId, null, getDefaultPerPage()).all());
}
......@@ -346,7 +346,7 @@ public class RunnersApi extends AbstractApi {
* @return a Stream of jobs that are being processed or were processed by specified Runner
* @throws GitLabApiException if any exception occurs
*/
public Stream<Job> getJobsStream(Integer runnerId) throws GitLabApiException {
public Stream<Job> getJobsStream(Long runnerId) throws GitLabApiException {
return (getJobs(runnerId, null, getDefaultPerPage()).stream());
}
......@@ -360,7 +360,7 @@ public class RunnersApi extends AbstractApi {
* @return List jobs that are being processed or were processed by specified Runner
* @throws GitLabApiException if any exception occurs
*/
public List<Job> getJobs(Integer runnerId, JobStatus status) throws GitLabApiException {
public List<Job> getJobs(Long runnerId, JobStatus status) throws GitLabApiException {
return (getJobs(runnerId, status, getDefaultPerPage()).all());
}
......@@ -374,7 +374,7 @@ public class RunnersApi extends AbstractApi {
* @return a Stream of jobs that are being processed or were processed by specified Runner
* @throws GitLabApiException if any exception occurs
*/
public Stream<Job> getJobsStream(Integer runnerId, JobStatus status) throws GitLabApiException {
public Stream<Job> getJobsStream(Long runnerId, JobStatus status) throws GitLabApiException {
return (getJobs(runnerId, status, getDefaultPerPage()).stream());
}
......@@ -388,7 +388,7 @@ public class RunnersApi extends AbstractApi {
* @return a Pager containing the Jobs for the Runner
* @throws GitLabApiException if any exception occurs
*/
public Pager<Job> getJobs(Integer runnerId, int itemsPerPage) throws GitLabApiException {
public Pager<Job> getJobs(Long runnerId, int itemsPerPage) throws GitLabApiException {
return (getJobs(runnerId, null, itemsPerPage));
}
......@@ -403,7 +403,7 @@ public class RunnersApi extends AbstractApi {
* @return a Pager containing the Jobs for the Runner
* @throws GitLabApiException if any exception occurs
*/
public Pager<Job> getJobs(Integer runnerId, JobStatus status, int itemsPerPage) throws GitLabApiException {
public Pager<Job> getJobs(Long runnerId, JobStatus status, int itemsPerPage) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
......@@ -419,7 +419,7 @@ public class RunnersApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/runners</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 List of all Runner available in the project
* @throws GitLabApiException if any exception occurs
*/
......@@ -433,7 +433,7 @@ public class RunnersApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/runners</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 all Runner available in the project
* @throws GitLabApiException if any exception occurs
*/
......@@ -447,7 +447,7 @@ public class RunnersApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/runners</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 Project instances that will be fetched per page
* @return Pager of all Runner available in the project
* @throws GitLabApiException if any exception occurs
......@@ -462,12 +462,12 @@ public class RunnersApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/runners</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 runnerId The ID of a runner
* @return Runner instance of the Runner enabled
* @throws GitLabApiException if any exception occurs
*/
public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
public Runner enableRunner(Object projectIdOrPath, Long runnerId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
Response response = post(Response.Status.CREATED, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
......@@ -480,12 +480,12 @@ public class RunnersApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/runners/:runner_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 runnerId The ID of a runner
* @return Runner instance of the Runner disabled
* @throws GitLabApiException if any exception occurs
*/
public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
public Runner disableRunner(Object projectIdOrPath, Long runnerId) throws GitLabApiException {
Response response = delete(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "runners", runnerId);
return (response.readEntity(Runner.class));
......
......@@ -199,7 +199,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&amp;search=:search-query</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......@@ -217,7 +217,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&amp;search=:search-query&amp;ref=ref</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......@@ -237,7 +237,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&amp;search=:search-query</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......@@ -255,7 +255,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&amp;search=:search-query&amp;ref=ref</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......@@ -276,7 +276,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /project/:projectId/search?scope=:scope&amp;search=:search-query</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......@@ -296,7 +296,7 @@ public class SearchApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /project/:projectId/search?scope=:scope&amp;search=:search-query&amp;ref=ref</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 scope search the expression within the specified scope. Currently these scopes are supported:
* issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
* @param search the search query
......
......@@ -88,7 +88,7 @@ public class SnippetsApi extends AbstractApi {
* @return the content of snippet
* @throws GitLabApiException if any exception occurs
*/
public String getSnippetContent(Integer snippetId) throws GitLabApiException {
public String getSnippetContent(Long snippetId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "snippets", snippetId, "raw");
return (response.readEntity(String.class));
}
......@@ -101,7 +101,7 @@ public class SnippetsApi extends AbstractApi {
* @return the snippet with the given id
* @throws GitLabApiException if any exception occurs
*/
public Snippet getSnippet(Integer snippetId, boolean downloadContent) throws GitLabApiException {
public Snippet getSnippet(Long snippetId, boolean downloadContent) throws GitLabApiException {
if (snippetId == null) {
throw new RuntimeException("snippetId can't be null");
......@@ -124,7 +124,7 @@ public class SnippetsApi extends AbstractApi {
* @return the snippet with the given id
* @throws GitLabApiException if any exception occurs
*/
public Snippet getSnippet(Integer snippetId) throws GitLabApiException {
public Snippet getSnippet(Long snippetId) throws GitLabApiException {
return getSnippet(snippetId, false);
}
......@@ -136,7 +136,7 @@ public class SnippetsApi extends AbstractApi {
* @param snippetId the ID of the snippet to get the Optional instance for
* @return the specified Snippet as an Optional instance
*/
public Optional<Snippet> getOptionalSnippet(Integer snippetId) {
public Optional<Snippet> getOptionalSnippet(Long snippetId) {
return (getOptionalSnippet(snippetId, false));
}
......@@ -149,7 +149,7 @@ public class SnippetsApi extends AbstractApi {
* @param downloadContent indicating whether to download the snippet content
* @return the specified Snippet as an Optional instance
*/
public Optional<Snippet> getOptionalSnippet(Integer snippetId, boolean downloadContent) {
public Optional<Snippet> getOptionalSnippet(Long snippetId, boolean downloadContent) {
try {
return (Optional.ofNullable(getSnippet(snippetId, downloadContent)));
} catch (GitLabApiException glae) {
......@@ -205,7 +205,7 @@ public class SnippetsApi extends AbstractApi {
* @param snippetId the snippet ID to remove
* @throws GitLabApiException if any exception occurs
*/
public void deleteSnippet(Integer snippetId) throws GitLabApiException {
public void deleteSnippet(Long snippetId) throws GitLabApiException {
if (snippetId == null) {
throw new RuntimeException("snippetId can't be null");
......
......@@ -31,7 +31,7 @@ public class SystemHooksApi extends AbstractApi {
}
/**
* Get a list of all system hooks using the specified page and per page settings.
* Get a list of all system hooks using the specified page and per page settings.
* This method requires admin access.
*
* <pre><code>GitLab Endpoint: GET /hooks</code></pre>
......@@ -148,7 +148,7 @@ public class SystemHooksApi extends AbstractApi {
* @param hookId the ID of the system hook to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteSystemHook(Integer hookId) throws GitLabApiException {
public void deleteSystemHook(Long hookId) throws GitLabApiException {
if (hookId == null) {
throw new RuntimeException("hookId cannot be null");
......@@ -183,7 +183,7 @@ public class SystemHooksApi extends AbstractApi {
* @param hookId the ID of the system hook to test
* @throws GitLabApiException if any exception occurs
*/
public void testSystemHook(Integer hookId) throws GitLabApiException {
public void testSystemHook(Long hookId) throws GitLabApiException {
if (hookId == null) {
throw new RuntimeException("hookId cannot be null");
......
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