Package org.kohsuke.github
Class GHRepositoryVariable.Creator
java.lang.Object
org.kohsuke.github.GHRepositoryVariableBuilder<GHRepositoryVariable.Creator>
org.kohsuke.github.GHRepositoryVariable.Creator
- Enclosing class:
- GHRepositoryVariable
@BetaApi
public static class GHRepositoryVariable.Creator
extends GHRepositoryVariableBuilder<GHRepositoryVariable.Creator>
A
GHRepositoryVariableBuilder
that creates a new GHRepositoryVariable
Consumer must call done()
to create the new instance.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.kohsuke.github.Requester
The requester.protected boolean
The update in place. -
Method Summary
Modifier and TypeMethodDescriptionprotected GHRepositoryVariable.Creator
Chooses whether to return a continuing builder or an updated data record IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromdone()
.done()
Finishes an update, committing changes.getRoot()
Deprecated.protected GHRepositoryVariable.Creator
Applies a value to a name for this builder.Methods inherited from class org.kohsuke.github.GHRepositoryVariableBuilder
name, value
-
Field Details
-
requester
The requester. -
updateInPlace
protected boolean updateInPlaceThe update in place.
-
-
Method Details
-
done
Finishes an update, committing changes. This method may update-in-place or not. Either way it returns the resulting instance.- Returns:
- an instance with updated current data
- Throws:
IOException
- if there is an I/O Exception
-
with
@Nonnull @BetaApi protected GHRepositoryVariable.Creator with(@Nonnull String name, Object value) throws IOException Applies a value to a name for this builder. IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromdone()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and calldone()
when they are ready.- Parameters:
name
- the name of the fieldvalue
- the value of the field- Returns:
- either a continuing builder or an updated data record
- Throws:
IOException
- if an I/O error occurs
-
continueOrDone
Chooses whether to return a continuing builder or an updated data record IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromdone()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and calldone()
when they are ready.- Returns:
- either a continuing builder or an updated data record
- Throws:
IOException
- if an I/O error occurs
-
getRoot
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
GitHub
instance, use a local copy instead of pulling it out of objects.