Package org.kohsuke.github
Class GHRepositoryVariableBuilder<S>
java.lang.Object
org.kohsuke.github.GHRepositoryVariableBuilder<S>
- Type Parameters:
S- the type parameter
- All Implemented Interfaces:
GitHubRequestBuilderDone<GHRepositoryVariable>
- Direct Known Subclasses:
GHRepositoryVariable.Creator,GHRepositoryVariable.Setter
The type Gh repository variable builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.kohsuke.github.RequesterThe requester.protected booleanThe update in place. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGHRepositoryVariableBuilder(Class<S> intermediateReturnType, GitHub root, GHRepositoryVariable baseInstance) Instantiates a new GH Repository Variable builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected SChooses whether to return a continuing builder or an updated data record IfAbstractBuilderis the same asAbstractBuilder, this method will commit changes after the first value change and return aAbstractBuilderfromGitHubRequestBuilderDone.done().done()Finishes a create or update request, committing changes.getRoot()Deprecated.Name.Name.protected SApplies a value to a name for this builder.
-
Field Details
-
requester
The requester. -
updateInPlace
protected boolean updateInPlaceThe update in place.
-
-
Constructor Details
-
GHRepositoryVariableBuilder
protected GHRepositoryVariableBuilder(@Nonnull Class<S> intermediateReturnType, @Nonnull GitHub root, @CheckForNull GHRepositoryVariable baseInstance) Instantiates a new GH Repository Variable builder.- Parameters:
intermediateReturnType- Intermediate return type for this builder returned by calls towith(String, Object). IfGHRepositoryVariableBuilderthe same asGHRepositoryVariable, this builder will commit changes after each call towith(String, Object).root- the GitHub instance to which updates will be sentbaseInstance- instance on which to base this builder. Ifnulla new instance will be created.
-
-
Method Details
-
name
Name.- Parameters:
value- the value- Returns:
- the s
- Throws:
IOException- Signals that an I/O exception has occurred.
-
value
Name.- Parameters:
value- the value- Returns:
- the s
- Throws:
IOException- Signals that an I/O exception has occurred.
-
done
Finishes a create or update request, committing changes. This method may update-in-place or not. Either way it returns the resulting instance.- Specified by:
donein interfaceGitHubRequestBuilderDone<R>- Returns:
- an instance with updated current data
- Throws:
IOException- if there is an I/O Exception
-
with
Applies a value to a name for this builder. IfAbstractBuilderis the same asAbstractBuilder, this method will commit changes after the first value change and return aAbstractBuilderfromGitHubRequestBuilderDone.done(). IfAbstractBuilderis not the same asAbstractBuilder, this method will return anAbstractBuilderand letting the caller batch together multiple changes and callGitHubRequestBuilderDone.done()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 IfAbstractBuilderis the same asAbstractBuilder, this method will commit changes after the first value change and return aAbstractBuilderfromGitHubRequestBuilderDone.done(). IfAbstractBuilderis not the same asAbstractBuilder, this method will return anAbstractBuilderand letting the caller batch together multiple changes and callGitHubRequestBuilderDone.done()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 theGitHubinstance, use a local copy instead of pulling it out of objects.Get the rootGitHubinstance for this object.- Returns:
- the root
GitHubinstance
-
GitHubinstance, use a local copy instead of pulling it out of objects.