-
Notifications
You must be signed in to change notification settings - Fork 475
Add Project Access Tokens #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1e157bd
Add project access tokens
bensofficial cc9567d
Merge branch 'main' of github.com:bensofficial/gitlab4j-api
bensofficial fa31b93
Rename methods
bensofficial 9406e55
Fix typos
bensofficial e17e7a1
Fixes
bensofficial 40cddd6
Add tests
bensofficial 1e4bc37
Fix config
bensofficial 2e797b8
Fix expired at date
bensofficial 837e9ab
Fix tests
bensofficial 06054a8
Merge branch 'gitlab4j:main' into main
bensofficial 3b87fad
Add JSON example and test
bensofficial 091ed3e
Merge branch 'main' of github.com:bensofficial/gitlab4j-api
bensofficial f2e3907
Fix imports
bensofficial b7f828a
Fix imports in test
bensofficial 5832c12
Fix JavaDoc and simplify code
bensofficial b27dfc3
Merge branch 'gitlab4j:main' into main
bensofficial 1e80f11
Comment out tests
bensofficial ad0d901
Fix typo
bensofficial File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
src/main/java/org/gitlab4j/api/models/ProjectAccessToken.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
package org.gitlab4j.api.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import org.gitlab4j.api.Constants; | ||
import org.gitlab4j.api.utils.JacksonJson; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
public class ProjectAccessToken { | ||
private Long userId; | ||
private List<Constants.ProjectAccessTokenScope> scopes; | ||
private String name; | ||
private Date expiresAt; | ||
private Long id; | ||
private Boolean active; | ||
private Date createdAt; | ||
private Boolean revoked; | ||
private Long accessLevel; | ||
private Date lastUsedAt; | ||
private String token; | ||
|
||
public Long getUserId() { | ||
return userId; | ||
} | ||
|
||
public void setUserId(Long userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public List<Constants.ProjectAccessTokenScope> getScopes() { | ||
return scopes; | ||
} | ||
|
||
public void setScopes(List<Constants.ProjectAccessTokenScope> scopes) { | ||
this.scopes = scopes; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Date getExpiresAt() { | ||
return expiresAt; | ||
} | ||
|
||
public void setExpiresAt(Date expiredAt) { | ||
this.expiresAt = expiredAt; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Boolean isActive() { | ||
return active; | ||
} | ||
|
||
public void setActive(Boolean active) { | ||
this.active = active; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Boolean isRevoked() { | ||
return revoked; | ||
} | ||
|
||
public void setRevoked(Boolean revoked) { | ||
this.revoked = revoked; | ||
} | ||
|
||
public Long getAccessLevel() { | ||
return accessLevel; | ||
} | ||
|
||
public void setAccessLevel(Long accessLevel) { | ||
this.accessLevel = accessLevel; | ||
} | ||
|
||
public Date getLastUsedAt() { | ||
return lastUsedAt; | ||
} | ||
|
||
public void setLastUsedAt(Date lastUsedAt) { | ||
this.lastUsedAt = lastUsedAt; | ||
} | ||
|
||
public String getToken() { | ||
return token; | ||
} | ||
|
||
public void setToken(String token) { | ||
this.token = token; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return JacksonJson.toJsonString(this); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.