Class AccessToken
java.lang.Object
build.cursed.genapi.forgejo.model.AccessToken
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-09-28T10:48:29.723777+02:00[Europe/Stockholm]",
comments="Generator version: 7.21.0")
public class AccessToken
extends Object
AccessToken
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRepositoriesItem(RepositoryMeta repositoriesItem) addScopesItem(String scopesItem) booleanstatic AccessTokenCreate an instance of AccessToken given an JSON stringgetId()Get idgetName()Get nameIndicates that an access token only has access to the specified repositories.Get scopesgetSha1()Get sha1Get tokenLastEightinthashCode()repositories(List<RepositoryMeta> repositories) voidvoidvoidsetRepositories(List<RepositoryMeta> repositories) voidvoidvoidsetTokenLastEight(String tokenLastEight) toJson()Convert an instance of AccessToken to an JSON stringtokenLastEight(String tokenLastEight) toString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_REPOSITORIES
- See Also:
-
SERIALIZED_NAME_SCOPES
- See Also:
-
SERIALIZED_NAME_SHA1
- See Also:
-
SERIALIZED_NAME_TOKEN_LAST_EIGHT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
AccessToken
public AccessToken()
-
-
Method Details
-
id
-
getId
Get id- Returns:
- id
-
setId
-
name
-
getName
Get name- Returns:
- name
-
setName
-
repositories
-
addRepositoriesItem
-
getRepositories
Indicates that an access token only has access to the specified repositories. Will be null if the access token is not limited to a set of specified repositories.- Returns:
- repositories
-
setRepositories
-
scopes
-
addScopesItem
-
getScopes
Get scopes- Returns:
- scopes
-
setScopes
-
sha1
-
getSha1
Get sha1- Returns:
- sha1
-
setSha1
-
tokenLastEight
-
getTokenLastEight
Get tokenLastEight- Returns:
- tokenLastEight
-
setTokenLastEight
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to AccessToken
-
fromJson
Create an instance of AccessToken given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of AccessToken
- Throws:
IOException- if the JSON string is invalid with respect to AccessToken
-
toJson
Convert an instance of AccessToken to an JSON string- Returns:
- JSON string
-