Class GHPublicKeyBuilder
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.builders.GHPublicKeyBuilder
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHPublicKeyBuilder
(Github github) Constructs a new GHPublicKeyBuilder instance with the provided GitHub instance.GHPublicKeyBuilder
(String title, String key, Github github) Constructs a new GHPublicKeyBuilder instance with the provided title, key, and GitHub instance. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new GHPublicKey instance with the set title and key.Returns the GitHub instance associated with this public key builder.getKey()
Returns the key of the public key.getTitle()
Returns the title of the public key.Sets the key of the public key.Sets the title of the public key.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl, toJSONObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHPublicKeyBuilder
Constructs a new GHPublicKeyBuilder instance with the provided GitHub instance.- Parameters:
github
- the GitHub instance associated with this public key builder
-
GHPublicKeyBuilder
Constructs a new GHPublicKeyBuilder instance with the provided title, key, and GitHub instance.- Parameters:
title
- the title of the public keykey
- the key of the public keygithub
- the GitHub instance associated with this public key builder
-
-
Method Details
-
setTitle
Sets the title of the public key.- Parameters:
title
- the title of the public key- Returns:
- this GHPublicKeyBuilder instance
-
setKey
Sets the key of the public key.- Parameters:
key
- the key of the public key- Returns:
- this GHPublicKeyBuilder instance
-
getTitle
Returns the title of the public key.- Returns:
- the title of the public key
-
getGithub
Returns the GitHub instance associated with this public key builder.- Returns:
- the GitHub instance
-
getKey
Returns the key of the public key.- Returns:
- the key of the public key
-
build
Builds a new GHPublicKey instance with the set title and key.- Returns:
- a new GHPublicKey instance
-