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
......@@ -104,7 +104,7 @@ public class TodosApi extends AbstractApi {
* @return Stream of Todo instances
* @throws GitLabApiException if any exception occurs
*/
public List<Todo> getTodos(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type) throws GitLabApiException {
public List<Todo> getTodos(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type) throws GitLabApiException {
return (getTodos(action, authorId, projectId, groupId, state, type, getDefaultPerPage()).all());
}
......@@ -122,7 +122,7 @@ public class TodosApi extends AbstractApi {
* @return Stream of Todo instances
* @throws GitLabApiException if any exception occurs
*/
public Stream<Todo> getTodosStream(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type) throws GitLabApiException {
public Stream<Todo> getTodosStream(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type) throws GitLabApiException {
return (getTodos(action, authorId, projectId, groupId, state, type, getDefaultPerPage()).stream());
}
......@@ -143,7 +143,7 @@ public class TodosApi extends AbstractApi {
* @return a list of pages in todo for the specified range
* @throws GitLabApiException if any exception occurs
*/
public Pager<Todo> getTodos(TodoAction action, Integer authorId, Integer projectId, Integer groupId, TodoState state, TodoType type, int itemsPerPage) throws GitLabApiException {
public Pager<Todo> getTodos(TodoAction action, Long authorId, Long projectId, Long groupId, TodoState state, TodoType type, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("action", action, false)
.withParam("author_id", authorId, false)
......@@ -164,7 +164,7 @@ public class TodosApi extends AbstractApi {
* @return todo instance with info on the created page
* @throws GitLabApiException if any exception occurs
*/
public Todo markAsDone(Integer todoId) throws GitLabApiException {
public Todo markAsDone(Long todoId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm();
Response response = post(Response.Status.OK, formData, "todos", todoId, "mark_as_done");
return (response.readEntity(Todo.class));
......
......@@ -177,7 +177,7 @@ public class UserApi extends AbstractApi {
* @param userId the ID of the user to block
* @throws GitLabApiException if any exception occurs
*/
public void blockUser(Integer userId) throws GitLabApiException {
public void blockUser(Long userId) throws GitLabApiException {
if (userId == null) {
throw new RuntimeException("userId cannot be null");
}
......@@ -197,7 +197,7 @@ public class UserApi extends AbstractApi {
* @param userId the ID of the user to unblock
* @throws GitLabApiException if any exception occurs
*/
public void unblockUser(Integer userId) throws GitLabApiException {
public void unblockUser(Long userId) throws GitLabApiException {
if (userId == null) {
throw new RuntimeException("userId cannot be null");
......@@ -276,7 +276,7 @@ public class UserApi extends AbstractApi {
* @return the User instance for the specified user ID
* @throws GitLabApiException if any exception occurs
*/
public User getUser(Integer userId) throws GitLabApiException {
public User getUser(Long userId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("with_custom_attributes", customAttributesEnabled);
Response response = get(Response.Status.OK, formData.asMap(), "users", userId);
return (response.readEntity(User.class));
......@@ -290,7 +290,7 @@ public class UserApi extends AbstractApi {
* @param userId the ID of the user to get
* @return the User for the specified user ID as an Optional instance
*/
public Optional<User> getOptionalUser(Integer userId) {
public Optional<User> getOptionalUser(Long userId) {
try {
return (Optional.ofNullable(getUser(userId)));
} catch (GitLabApiException glae) {
......@@ -638,7 +638,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /users/:id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @throws GitLabApiException if any exception occurs
*/
public void deleteUser(Object userIdOrUsername) throws GitLabApiException {
......@@ -650,7 +650,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /users/:id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param hardDelete If true, contributions that would usually be moved to the
* ghost user will be deleted instead, as well as groups owned solely by this user
* @throws GitLabApiException if any exception occurs
......@@ -696,7 +696,7 @@ public class UserApi extends AbstractApi {
* @return a list of a specified user's SSH keys
* @throws GitLabApiException if any exception occurs
*/
public List<SshKey> getSshKeys(Integer userId) throws GitLabApiException {
public List<SshKey> getSshKeys(Long userId) throws GitLabApiException {
if (userId == null) {
throw new RuntimeException("userId cannot be null");
......@@ -721,7 +721,7 @@ public class UserApi extends AbstractApi {
* @return an SshKey instance holding the info on the SSH key specified by keyId
* @throws GitLabApiException if any exception occurs
*/
public SshKey getSshKey(Integer keyId) throws GitLabApiException {
public SshKey getSshKey(Long keyId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "user", "keys", keyId);
return (response.readEntity(SshKey.class));
}
......@@ -734,7 +734,7 @@ public class UserApi extends AbstractApi {
* @param keyId the ID of the SSH key
* @return an SshKey as an Optional instance holding the info on the SSH key specified by keyId
*/
public Optional<SshKey> getOptionalSshKey(Integer keyId) {
public Optional<SshKey> getOptionalSshKey(Long keyId) {
try {
return (Optional.ofNullable(getSshKey(keyId)));
} catch (GitLabApiException glae) {
......@@ -769,7 +769,7 @@ public class UserApi extends AbstractApi {
* @return an SshKey instance with info on the added SSH key
* @throws GitLabApiException if any exception occurs
*/
public SshKey addSshKey(Integer userId, String title, String key) throws GitLabApiException {
public SshKey addSshKey(Long userId, String title, String key) throws GitLabApiException {
if (userId == null) {
throw new RuntimeException("userId cannot be null");
......@@ -794,7 +794,7 @@ public class UserApi extends AbstractApi {
* @param keyId the key ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteSshKey(Integer keyId) throws GitLabApiException {
public void deleteSshKey(Long keyId) throws GitLabApiException {
if (keyId == null) {
throw new RuntimeException("keyId cannot be null");
......@@ -809,11 +809,11 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /users/:id/keys/:key_id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param keyId the key ID to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteSshKey(Object userIdOrUsername, Integer keyId) throws GitLabApiException {
public void deleteSshKey(Object userIdOrUsername, Long keyId) throws GitLabApiException {
if (keyId == null) {
throw new RuntimeException("keyId cannot be null");
......@@ -828,7 +828,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /users/:id/impersonation_tokens</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @return a list of a specified user's impersonation tokens
* @throws GitLabApiException if any exception occurs
*/
......@@ -841,7 +841,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /users/:id/impersonation_tokens</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param state the state of impersonation tokens to list (ALL, ACTIVE, INACTIVE)
* @return a list of a specified user's impersonation tokens
* @throws GitLabApiException if any exception occurs
......@@ -859,12 +859,12 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param tokenId the impersonation token ID to get
* @return the specified impersonation token
* @throws GitLabApiException if any exception occurs
*/
public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException {
public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Long tokenId) throws GitLabApiException {
if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null");
......@@ -879,11 +879,11 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param tokenId the impersonation token ID to get
* @return the specified impersonation token as an Optional instance
*/
public Optional<ImpersonationToken> getOptionalImpersonationToken(Object userIdOrUsername, Integer tokenId) {
public Optional<ImpersonationToken> getOptionalImpersonationToken(Object userIdOrUsername, Long tokenId) {
try {
return (Optional.ofNullable(getImpersonationToken(userIdOrUsername, tokenId)));
} catch (GitLabApiException glae) {
......@@ -896,7 +896,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /users/:user_id/impersonation_tokens</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param name the name of the impersonation token, required
* @param expiresAt the expiration date of the impersonation token, optional
* @param scopes an array of scopes of the impersonation token
......@@ -926,11 +926,11 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param tokenId the impersonation token ID to revoke
* @throws GitLabApiException if any exception occurs
*/
public void revokeImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException {
public void revokeImpersonationToken(Object userIdOrUsername, Long tokenId) throws GitLabApiException {
if (tokenId == null) {
throw new RuntimeException("tokenId cannot be null");
......@@ -988,7 +988,7 @@ public class UserApi extends AbstractApi {
/**
* Creates custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param customAttribute the custom attribute to set
* @return the created CustomAttribute
* @throws GitLabApiException on failure while setting customAttributes
......@@ -1003,7 +1003,7 @@ public class UserApi extends AbstractApi {
/**
* Creates custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param key for the customAttribute
* @param value or the customAttribute
* @return the created CustomAttribute
......@@ -1027,7 +1027,7 @@ public class UserApi extends AbstractApi {
/**
* Change custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param customAttribute the custome attribute to change
* @return the changed CustomAttribute
* @throws GitLabApiException on failure while changing customAttributes
......@@ -1046,7 +1046,7 @@ public class UserApi extends AbstractApi {
/**
* Changes custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param key for the customAttribute
* @param value for the customAttribute
* @return changedCustomAttribute
......@@ -1059,7 +1059,7 @@ public class UserApi extends AbstractApi {
/**
* Delete a custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param customAttribute to remove
* @throws GitLabApiException on failure while deleting customAttributes
*/
......@@ -1074,7 +1074,7 @@ public class UserApi extends AbstractApi {
/**
* Delete a custom attribute for the given user
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param key of the customAttribute to remove
* @throws GitLabApiException on failure while deleting customAttributes
*/
......@@ -1104,7 +1104,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>PUT /users/:id</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param avatarFile the File instance of the avatar file to upload
* @return the updated User instance
* @throws GitLabApiException if any exception occurs
......@@ -1132,7 +1132,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /user/:id/emails</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @return a List of Email instances for the specified user
* @throws GitLabApiException if any exception occurs
*/
......@@ -1175,7 +1175,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /user/:id/emails</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param email the email address to add
* @param skipConfirmation skip confirmation and assume e-mail is verified - true or false (default)
* @return the Email instance for the added email
......@@ -1207,7 +1207,7 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /user/:id/emails/:emailId</code></pre>
*
* @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
* @param userIdOrUsername the user in the form of an Long(ID), String(username), or User instance
* @param emailId the email ID to delete
* @throws GitLabApiException if any exception occurs
*/
......@@ -1247,10 +1247,10 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /user/gpg_keys/:keyId</code></pre>
*
* @param keyId the key ID in the form if an Integer(ID)
* @param keyId the key ID in the form if an Long(ID)
* @throws GitLabApiException if any exception occurs
*/
public void deleteGpgKey(final Integer keyId) throws GitLabApiException {
public void deleteGpgKey(final Long keyId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "user", "gpg_keys", keyId);
}
......@@ -1259,10 +1259,10 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /users/:id/gpg_keys</code></pre>
*
* @param userId the user in the form of an Integer(ID)
* @param userId the user in the form of an Long(ID)
* @throws GitLabApiException if any exception occurs
*/
public List<GpgKey> listGpgKeys(final Integer userId) throws GitLabApiException {
public List<GpgKey> listGpgKeys(final Long userId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "users", userId, "gpg_keys");
return (response.readEntity(new GenericType<List<GpgKey>>() {}));
}
......@@ -1272,11 +1272,11 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /users/:id/gpg_keys</code></pre>
*
* @param userId the user in the form of an Integer(ID)
* @param userId the user in the form of an Long(ID)
* @param key the ASCII-armored exported public GPG key to add
* @throws GitLabApiException if any exception occurs
*/
public GpgKey addGpgKey(final Integer userId, final String key) throws GitLabApiException {
public GpgKey addGpgKey(final Long userId, final String key) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("key", key, true);
Response response = post(Response.Status.CREATED, formData, "users", userId, "gpg_keys");
......@@ -1288,11 +1288,11 @@ public class UserApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /users/:id/gpg_keys/:keyId</code></pre>
*
* @param userId the user in the form of an Integer(ID)
* @param keyId the key ID in the form if an Integer(ID)
* @param userId the user in the form of an Long(ID)
* @param keyId the key ID in the form if an Long(ID)
* @throws GitLabApiException if any exception occurs
*/
public void deleteGpgKey(final Integer userId, final Integer keyId) throws GitLabApiException {
public void deleteGpgKey(final Long userId, final Long keyId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "users", userId, "gpg_keys", keyId);
}
......@@ -1306,7 +1306,7 @@ public class UserApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
* @since GitLab 12.8
*/
public List<Membership> getMemberships(int userId) throws GitLabApiException {
public List<Membership> getMemberships(Long userId) throws GitLabApiException {
return getMemberships(userId, getDefaultPerPage()).all();
}
......@@ -1323,7 +1323,7 @@ public class UserApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
* @since GitLab 12.8
*/
public Pager<Membership> getMemberships(int userId, int itemsPerPage) throws GitLabApiException {
public Pager<Membership> getMemberships(Long userId, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm();
return (new Pager<>(this, Membership.class, itemsPerPage, formData.asMap(), "users", userId, "memberships"));
}
......
......@@ -51,7 +51,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a list of pages in the project's wiki
* @throws GitLabApiException if any exception occurs
*/
......@@ -64,7 +64,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param itemsPerPage the number of WikiPage instances that will be fetched per page
* @return a Pager of pages in project's wiki for the specified range
* @throws GitLabApiException if any exception occurs
......@@ -78,7 +78,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @return a Pager of pages in project's wiki for the specified range
* @throws GitLabApiException if any exception occurs
*/
......@@ -91,7 +91,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param page the page to get
* @param perPage the number of wiki-pages per page
* @return a list of pages in project's wiki for the specified range
......@@ -109,7 +109,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param withContent if true the results will include the pages content
* @return a List of pages in project's wiki for the specified range
* @throws GitLabApiException if any exception occurs
......@@ -123,7 +123,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param withContent if true the results will include the pages content
* @param itemsPerPage the number of WikiPage instances that will be fetched per page
* @return a Pager of pages in project's wiki for the specified range
......@@ -140,7 +140,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param withContent if true the results will include the pages content
* @return a Stream of pages in project's wiki for the specified range
* @throws GitLabApiException if any exception occurs
......@@ -154,7 +154,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis/:slug</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param slug the slug of the project's wiki page
* @return the specified project Snippet
* @throws GitLabApiException if any exception occurs
......@@ -170,7 +170,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: GET /projects/:id/wikis/:slug</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param slug the slug of the project's wiki page
* @return the specified project Snippet as an Optional instance
*/
......@@ -187,7 +187,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: POST /projects/:id/wikis</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param title the title of a snippet, required
* @param content the content of a wiki page, required
* @return a WikiPage instance with info on the created page
......@@ -209,7 +209,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/wikis/:slug</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param slug the slug of the project's wiki page, required
* @param title the title of a snippet, optional
* @param content the content of a page, optional. Either title or content must be supplied.
......@@ -233,7 +233,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>GitLab Endpoint: DELETE /projects/:id/wikis/:slug</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param slug the slug of the project's wiki page
* @throws GitLabApiException if any exception occurs
*/
......@@ -246,7 +246,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>POST /projects/:id/wikis/attachments</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 fileToUpload the File instance of the file to upload, required
* @return a FileUpload instance with information on the just uploaded file
* @throws GitLabApiException if any exception occurs
......@@ -260,7 +260,7 @@ public class WikisApi extends AbstractApi {
*
* <pre><code>POST /projects/:id/wikis/attachments</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 fileToUpload the File instance of the file to upload, required
* @param branch the name of the branch, defaults to the wiki repository default branch, optional
* @return a FileUpload instance with information on the just uploaded file
......
......@@ -12,7 +12,7 @@ public abstract class AbstractUser<U extends AbstractUser<U>> {
private String avatarUrl;
private Date createdAt;
private String email;
private Integer id;
private Long id;
private String name;
private String state;
private String username;
......@@ -42,11 +42,11 @@ public abstract class AbstractUser<U extends AbstractUser<U>> {
this.email = email;
}
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......@@ -101,7 +101,7 @@ public abstract class AbstractUser<U extends AbstractUser<U>> {
}
@SuppressWarnings("unchecked")
public U withId(Integer id) {
public U withId(Long id) {
this.id = id;
return (U)this;
}
......@@ -129,7 +129,7 @@ public abstract class AbstractUser<U extends AbstractUser<U>> {
this.webUrl = webUrl;
return (U)this;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
......
......@@ -9,10 +9,10 @@ import org.gitlab4j.api.GitLabApiForm;
public class AllowedTo {
private AccessLevel accessLevel;
private Integer userId;
private Integer groupId;
private Long userId;
private Long groupId;
public AllowedTo(AccessLevel accessLevel, Integer userId, Integer groupId) {
public AllowedTo(AccessLevel accessLevel, Long userId, Long groupId) {
this.accessLevel = accessLevel;
this.userId = userId;
this.groupId = groupId;
......@@ -23,12 +23,12 @@ public class AllowedTo {
return (this);
}
public AllowedTo withUserId(Integer userId) {
public AllowedTo withUserId(Long userId) {
this.userId = userId;
return (this);
}
public AllowedTo withGroupId(Integer groupId) {
public AllowedTo withGroupId(Long groupId) {
this.groupId = groupId;
return (this);
}
......
......@@ -2,16 +2,16 @@ package org.gitlab4j.api.models;
public class Application {
private Integer id;
private Long id;
private String applicationId;
private String applicationName;
private String callbackUrl;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -19,16 +19,16 @@ import com.fasterxml.jackson.databind.node.TextNode;
public class ApplicationSettings {
private Integer id;
private Long id;
private Date createdAt;
private Date updatedAt;
private Map<String, Object> settings = new HashMap<>();
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -6,7 +6,7 @@ import java.util.List;
public class ApprovalRule {
private Integer id;
private Long id;
private String name;
private String ruleType;
private List<User> eligibleApprovers;
......@@ -18,11 +18,11 @@ public class ApprovalRule {
private List<User> approvedBy;
private Boolean approved;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -8,8 +8,8 @@ public class ApprovalRuleParams {
private String name;
private Integer approvalsRequired;
private List<Integer> userIds;
private List<Integer> groupIds;
private List<Long> userIds;
private List<Long> groupIds;
public ApprovalRuleParams withName(String name) {
this.name = name;
......@@ -21,12 +21,12 @@ public class ApprovalRuleParams {
return (this);
}
public ApprovalRuleParams withUserIds(List<Integer> userIds) {
public ApprovalRuleParams withUserIds(List<Long> userIds) {
this.userIds = userIds;
return (this);
}
public ApprovalRuleParams withGroupIds(List<Integer> groupIds) {
public ApprovalRuleParams withGroupIds(List<Long> groupIds) {
this.groupIds = groupIds;
return (this);
}
......
......@@ -39,16 +39,16 @@ public class Assets {
public static class Link {
private Integer id;
private Long id;
private String name;
private String url;
private Boolean external;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -7,34 +7,34 @@ import org.gitlab4j.api.utils.JacksonJson;
public class AuditEvent {
private Integer id;
private Integer authorId;
private Integer entityId;
private Long id;
private Long authorId;
private Long entityId;
private String entityType;
private AuditEventDetail details;
private Date createdAt;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
public Integer getAuthorId() {
public Long getAuthorId() {
return authorId;
}
public void setAuthorId(Integer authorId) {
public void setAuthorId(Long authorId) {
this.authorId = authorId;
}
public Integer getEntityId() {
public Long getEntityId() {
return entityId;
}
public void setEntityId(Integer entityId) {
public void setEntityId(Long entityId) {
this.entityId = entityId;
}
......
......@@ -32,19 +32,19 @@ public class AwardEmoji {
}
}
private Integer id;
private Long id;
private String name;
private User user;
private Date createdAt;
private Date updatedAt;
private Integer awardableId;
private Long awardableId;
private AwardableType awardableType;
public Integer getId() {
public Long getId() {
return this.id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......@@ -80,11 +80,11 @@ public class AwardEmoji {
this.updatedAt = updatedAt;
}
public Integer getAwardableId() {
public Long getAwardableId() {
return awardableId;
}
public void setAwardableId(Integer awardableId) {
public void setAwardableId(Long awardableId) {
this.awardableId = awardableId;
}
......
......@@ -29,7 +29,7 @@ public class Badge {
}
}
private Integer id;
private Long id;
private String name;
private String linkUrl;
private String imageUrl;
......@@ -37,11 +37,11 @@ public class Badge {
private String renderedImageUrl;
private BadgeKind kind;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -6,17 +6,17 @@ import org.gitlab4j.api.utils.JacksonJson;
public class Board {
private Integer id;
private Long id;
private String name;
private Project project;
private Milestone milestone;
private List<BoardList> lists;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -4,15 +4,15 @@ import org.gitlab4j.api.utils.JacksonJson;
public class BoardList {
private Integer id;
private Long id;
private Label label;
private Integer position;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -6,8 +6,8 @@ public class BranchAccessLevel {
private AccessLevel accessLevel;
private String accessLevelDescription;
private Integer userId;
private Integer groupId;
private Long userId;
private Long groupId;
public AccessLevel getAccessLevel() {
return this.accessLevel;
......@@ -25,19 +25,19 @@ public class BranchAccessLevel {
this.accessLevelDescription = accessLevelDescription;
}
public Integer getUserId() {
public Long getUserId() {
return userId;
}
public void setUserId(Integer userId) {
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getGroupId() {
public Long getGroupId() {
return groupId;
}
public void setGroupId(Integer groupId) {
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
......
......@@ -7,17 +7,17 @@ import org.gitlab4j.api.utils.JacksonJson;
public class DeployKey {
private Integer id;
private Long id;
private String title;
private String key;
private Boolean canPush;
private Date createdAt;
public Integer getId() {
public Long getId() {
return this.id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -8,18 +8,18 @@ import java.util.List;
public class DeployToken {
private Integer id;
private Long id;
private String name;
private String username;
private Date expiresAt;
private List<Constants.DeployTokenScope> scopes;
private String token;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -8,7 +8,7 @@ import org.gitlab4j.api.utils.JacksonJson;
public class Deployable {
private Integer id;
private Long id;
private DeploymentStatus status;
private String stage;
private String name;
......@@ -27,11 +27,11 @@ public class Deployable {
private Runner runner;
private Date artifactsExpireAt;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -7,8 +7,8 @@ import org.gitlab4j.api.utils.JacksonJson;
public class Deployment {
private Integer id;
private Integer iid;
private Long id;
private Long iid;
private String ref;
private String sha;
private Date createdAt;
......@@ -18,19 +18,19 @@ public class Deployment {
private Environment environment;
private Deployable deployable;
public Integer getId() {
public Long getId() {
return id;
}
public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}
public Integer getIid() {
public Long getIid() {
return iid;
}
public void setIid(Integer iid) {
public void setIid(Long iid) {
this.iid = iid;
}
......
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