Package org.kohsuke.github
Class GHDiscussion.Updater
- java.lang.Object
-
- org.kohsuke.github.GHDiscussion.Updater
-
- Enclosing class:
- GHDiscussion
public static class GHDiscussion.Updater extends Object
AGHLabelBuilder
that allows multiple properties to be updated per request. Consumer must calldone()
to commit changes.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.kohsuke.github.Requester
requester
protected boolean
updateInPlace
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description S
body(String value)
Body content for this discussion.protected S
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()
.GHDiscussion
done()
Finishes an update, committing changes.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.S
title(String value)
Title for this discussion.protected S
with(String name, Object value)
Applies a value to a name for this builder.
-
-
-
Field Detail
-
requester
@Nonnull protected final org.kohsuke.github.Requester requester
-
updateInPlace
protected boolean updateInPlace
-
-
Method Detail
-
title
@Nonnull public S title(String value) throws IOException
Title for this discussion.- Parameters:
value
- title of discussion- Returns:
- either a continuing builder or an updated
GHDiscussion
- Throws:
IOException
- if there is an I/O Exception
-
body
@Nonnull public S body(String value) throws IOException
Body content for this discussion.- Parameters:
value
- body of discussion*- Returns:
- either a continuing builder or an updated
GHDiscussion
- Throws:
IOException
- if there is an I/O Exception
-
done
@Nonnull public GHDiscussion done() throws IOException
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 S 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
@Nonnull @BetaApi protected S continueOrDone() throws IOException
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 public GitHub 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
-
-