Class GHPublicKeyBuilder

java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.builders.GHPublicKeyBuilder
All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHPublicKeyBuilder extends GHBase
This class is a builder for creating a new GHPublicKey instance. It provides methods for setting the title and key of the public key, and for building the public key.
  • Constructor Details

    • GHPublicKeyBuilder

      public GHPublicKeyBuilder(Github github)
      Constructs a new GHPublicKeyBuilder instance with the provided GitHub instance.
      Parameters:
      github - the GitHub instance associated with this public key builder
    • GHPublicKeyBuilder

      public GHPublicKeyBuilder(String title, String key, Github github)
      Constructs a new GHPublicKeyBuilder instance with the provided title, key, and GitHub instance.
      Parameters:
      title - the title of the public key
      key - the key of the public key
      github - the GitHub instance associated with this public key builder
  • Method Details

    • setTitle

      public GHPublicKeyBuilder setTitle(String title)
      Sets the title of the public key.
      Parameters:
      title - the title of the public key
      Returns:
      this GHPublicKeyBuilder instance
    • setKey

      public GHPublicKeyBuilder setKey(String key)
      Sets the key of the public key.
      Parameters:
      key - the key of the public key
      Returns:
      this GHPublicKeyBuilder instance
    • getTitle

      public String getTitle()
      Returns the title of the public key.
      Returns:
      the title of the public key
    • getGithub

      public Github getGithub()
      Returns the GitHub instance associated with this public key builder.
      Returns:
      the GitHub instance
    • getKey

      public String getKey()
      Returns the key of the public key.
      Returns:
      the key of the public key
    • build

      public GHPublicKey build()
      Builds a new GHPublicKey instance with the set title and key.
      Returns:
      a new GHPublicKey instance