Class CreateAccessTokenOption

java.lang.Object
build.cursed.genapi.forgejo.model.CreateAccessTokenOption

@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 CreateAccessTokenOption extends Object
CreateAccessTokenOption options when create access token
  • Field Details

  • Constructor Details

    • CreateAccessTokenOption

      public CreateAccessTokenOption()
  • Method Details

    • name

      public CreateAccessTokenOption name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Get name
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • repositories

      public CreateAccessTokenOption repositories(@Nullable List<RepoTargetOption> repositories)
    • addRepositoriesItem

      public CreateAccessTokenOption addRepositoriesItem(RepoTargetOption repositoriesItem)
    • getRepositories

      @Nullable public List<RepoTargetOption> getRepositories()
      If provided and not-empty, creates an access token with access only to specified repositories.
      Returns:
      repositories
    • setRepositories

      public void setRepositories(@Nullable List<RepoTargetOption> repositories)
    • scopes

      public CreateAccessTokenOption scopes(@Nullable List<String> scopes)
    • addScopesItem

      public CreateAccessTokenOption addScopesItem(String scopesItem)
    • getScopes

      @Nullable public List<String> getScopes()
      Get scopes
      Returns:
      scopes
    • setScopes

      public void setScopes(@Nullable List<String> scopes)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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 CreateAccessTokenOption
    • fromJson

      public static CreateAccessTokenOption fromJson(String jsonString) throws IOException
      Create an instance of CreateAccessTokenOption given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of CreateAccessTokenOption
      Throws:
      IOException - if the JSON string is invalid with respect to CreateAccessTokenOption
    • toJson

      public String toJson()
      Convert an instance of CreateAccessTokenOption to an JSON string
      Returns:
      JSON string