Class GHDiscussion.Updater

java.lang.Object
org.kohsuke.github.GHDiscussion.Updater
All Implemented Interfaces:
GitHubRequestBuilderDone<GHDiscussion>
Enclosing class:
GHDiscussion

public static class GHDiscussion.Updater extends Object
A GHLabelBuilder that allows multiple properties to be updated per request. Consumer must call AbstractBuilder.done() to commit changes.
  • Field Details

    • requester

      @Nonnull protected final org.kohsuke.github.Requester requester
      The requester.
    • updateInPlace

      protected boolean updateInPlace
      The update in place.
  • Method Details

    • title

      @Nonnull public GHDiscussion.Updater 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 GHDiscussion.Updater 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 a create or update request, committing changes. This method may update-in-place or not. Either way it returns the resulting instance.
      Specified by:
      done in interface GitHubRequestBuilderDone<S>
      Returns:
      an instance with updated current data
      Throws:
      IOException - if there is an I/O Exception
    • with

      @Nonnull @BetaApi protected GHDiscussion.Updater with(@Nonnull String name, Object value) throws IOException
      Applies a value to a name for this builder. If AbstractBuilder is the same as AbstractBuilder, this method will commit changes after the first value change and return a AbstractBuilder from GitHubRequestBuilderDone.done(). If AbstractBuilder is not the same as AbstractBuilder, this method will return an AbstractBuilder and letting the caller batch together multiple changes and call GitHubRequestBuilderDone.done() when they are ready.
      Parameters:
      name - the name of the field
      value - 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 GHDiscussion.Updater continueOrDone() throws IOException
      Chooses whether to return a continuing builder or an updated data record If AbstractBuilder is the same as AbstractBuilder, this method will commit changes after the first value change and return a AbstractBuilder from GitHubRequestBuilderDone.done(). If AbstractBuilder is not the same as AbstractBuilder, this method will return an AbstractBuilder and letting the caller batch together multiple changes and call GitHubRequestBuilderDone.done() when they are ready.
      Returns:
      either a continuing builder or an updated data record
      Throws:
      IOException - if an I/O error occurs